Questions tagged [delphi-xe2]

Delphi XE2 is a specific version of Delphi. Delphi XE2 was released on September 1, 2011 and is available as a standalone product or as part of RAD Studio XE2.

Delphi XE2 is a specific version of released on September 1, 2011.

Notable new features of Delphi XE2 are:

  • Support for 64 bit applications (on Windows only);
  • Inclusion of a new framework called that allows for cross platform development;
  • Cross platform development for Mac OS X and iOS(*) (in addition to Windows);
  • Live bindings, a new data binding concept for VCL and FireMonkey that supersedes data-awareness of controls.

*iOS projects require an extra development step using Xcode and the Free Pascal compiler on a Mac, but do deliver native iOS code.

Delphi XE2 was preceded by .

Always use the tag alongside this tag.

2598 questions
35
votes
1 answer

How to build using MSBuild and Delphi XE2

I've been building projects using Delphi XE and MSBuild using the following simple example which works fine in a batch file. Project1 is an empty project created using 'File | New | VCL forms application in the IDE: call "c:\Program Files…
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
35
votes
3 answers

Why does CreateProcess give error 193 (%1 is not a valid Win32 app)

The code below fails to start documents. I get error 193 (%1 is not a valid Win32 app). Starting executables work fine. The files are properly associated, they start the corresponding app when double clicked. I have searched SO and elsewhere for the…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
35
votes
2 answers

Firemonkey (FMX) bitmap and colours

Assume I have a small bitmap in Firemonkey (say 32x24 pixels). So I put a TImage onto a form and in the constructor there is this code: Image1.Bitmap.Create(32, 24); if Image1.Bitmap.Canvas.BeginScene then try …
Jason
  • 2,572
  • 3
  • 34
  • 41
34
votes
3 answers

What are the reasons to use TArray instead of Array of T?

I'm migrating a legacy Delphi application to Delphi-XE2, and I'm wondering if there's a good reason to replace the arrays defined as Array of MyType to TArray. So the question is what are the pros and cons of TArray usage instead of …
Salvador
  • 16,132
  • 33
  • 143
  • 245
32
votes
8 answers

How to open an URL with the default browser with FireMonkey cross-platform applications?

Usually, I use: ShellExecute(0, 'OPEN', PChar(edtURL.Text), '', '', SW_SHOWNORMAL); How can I have the same behaviour (opening a link in the default browser), on all platforms (Windows and OSX)?
Whiler
  • 7,998
  • 4
  • 32
  • 56
32
votes
1 answer

Which language elements can be annotated using attributes language feature of Delphi?

Delphi 2010 introduced custom attributes which can be added to type declarations and methods. For which language elements can a custom attribute be used? The examples which I have found so far include class declarations, fields and methods. (And…
mjn
  • 36,362
  • 28
  • 176
  • 378
31
votes
2 answers

Howto add menu item to Mac OS Finder in Delphi XE2

I'm working on Delphi XE2 application targetting Mac OS and Windows. And I want to have integration into context menu. For windows this is simple task. But for Mac OS I dont know how to do this. I've read Providing a Service documentation and tried…
GothAr
  • 503
  • 5
  • 16
27
votes
4 answers

Pass record parameter without declaring it first as a variable

If I am trying to call a procedure which has a record type (not object) as a parameter, is it possible to somehow pass details of that parameter "inline" without having to declare a variable of that type first? eg assume I have this simple record…
Jason
  • 2,572
  • 3
  • 34
  • 41
26
votes
6 answers

Delphi XE2 64-bit extremely slow runtime performance on string routines

I'm porting some applications from 32 to 64 bits delphi, which do a lot of text processing, and noticed an extreme change in processing speed. Did some tests with a few procedures, for example, this takes already more than 200% the time in 64bits…
hikari
  • 3,393
  • 1
  • 33
  • 72
25
votes
3 answers

Design-time package fails to build - File not found: 'Graphics.dcu'

In Delphi XE2, I have a single control in a pair of design/run time packages. Originally, everything was working fine. I've built each of them many times already. Suddenly without warning, the design time package started complaining in one of my…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
25
votes
1 answer

Delphi XE2: Debug a 64 bit dll through a 64 bit app

Has anyone had success in debugging a 64 bit dll by running/attaching to a 64 bit application? I have Delphi code for both the application and the dll. I can debug the application in 32 bit and 64 bits. I can also debug the 32 bit dll by using Run…
Steve Magness
  • 863
  • 14
  • 25
25
votes
6 answers

Delphi XE2: Possible to instantiate a FireMonkey Form in VCL application?

Prior to Delphi XE2, we have VCL only to create GUI apps. Delphi XE2 states that: Caution: FireMonkey (FMX) and the Visual Component Library (VCL) are not compatible and cannot be used in the same project or application. That is, an…
Chau Chee Yang
  • 18,422
  • 16
  • 68
  • 132
25
votes
1 answer

Delphi XE2 VCL styles, updating caption blocks other controls invalidation

Found a glitch with VCL styles: when you update the form caption, other controls previously redrawn within the same procedure don't get repainted, and you are forced to call Repaint, losing valuable processing time to redraw. Example: (set project…
hikari
  • 3,393
  • 1
  • 33
  • 72
24
votes
8 answers

How to bring my application to the front?

I know all the reasons why it is a bad idea. I dislike it if an application steals input focus, but this is for purely personal use and I want it to happen; it will not disturb anything. (for the curious: I am running unit tests in NetBeans, which…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
23
votes
8 answers

How can I automate getting the date of build into a constant visible to my code?

I would like to define in my code a constant holding the date on which the executable was built. I would naturally like to automate that process. I know that I can write a pre-build script using, for example, Perl, to write out a .inc file…
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490