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
17
votes
1 answer

Can I check to see if CoInitialize has been called or not?

In a multi-threaded environment with ADO database connections, I would like to know if CoInitialize has been called or not. How would I go about checking this?
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
17
votes
2 answers

Conversion with StrToDateTime and TFormatSettings does not work

This code should work in Delphi XE2, but it gives "not a valid date and time" error in StrtoDateTime conversion: procedure TForm2.Button1Click(Sender: TObject); var s: string; d: TDateTime; FmtStngs: TFormatSettings; begin …
Moore
  • 221
  • 1
  • 4
  • 12
17
votes
1 answer

Custom Messages in Non-Windowed Classes - need a default handler?

With a class (TObject) I have : private FHwnd : HWND; procedure HandleMyMessage(var Message : TMessage); message TH_MYMESSAGE; where TH_MYMESSAGE = WM_USER + 1 In the class constructor: FHwnd := AllocateHWND(HandleMyMessage); The only object…
J...
  • 30,968
  • 6
  • 66
  • 143
16
votes
4 answers

Is there an easy way to copy the TDictionary content into another?

Is there a single method or easy way how to copy one TDictionary content into another ? Let's say I have the following declarations type TItemKey = record ItemID: Integer; ItemType: Integer; end; TItemData = record Name: string; …
Martin Reiner
  • 2,167
  • 2
  • 20
  • 34
16
votes
1 answer

Is there any Delphi XE2 styles gallery?

In XE2 there is a new function : 'styles', for VCL(.vsf) and Firemonkey (.styles), and some are provided in C:\Program Files\Embarcadero\RAD Studio\9.0\Redist\styles directory. As it seems to be easy to create a new style, is there any 'styles…
philnext
  • 3,242
  • 5
  • 39
  • 62
16
votes
1 answer

How add Delphi XE2 64bit support to a simple Delphi XE2 32bit VCL component?

I need convert a VCL component from 32bit to 64bit (Delphi XE2). Now infact I can install it only if I select "32bit Platform", if I select "64bit Platform" I can compile it but not install (there is not the install menu). How can I add 64bit…
Martin
  • 1,065
  • 1
  • 17
  • 36
16
votes
4 answers

Application hangs in SysUtils -> DoneMonitorSupport on exit

I am writing a very thread intensive application that hangs when it exits. I've traced into the system units and found the place where the program enters an infinite loop. It's in SysUtils line 19868 -> DoneMonitorSupport -> CleanEventList: repeat…
norgepaul
  • 6,013
  • 4
  • 43
  • 76
16
votes
2 answers

How to define a breakpoint whenever an object field value changes?

As an example, given the code extract below, I would like to define a breakpoint that triggers whenever the object field value changes and optionally, breaks on a condition (False or True in this case). type TForm1 = class(TForm) EnableButton:…
Jack G.
  • 3,681
  • 4
  • 20
  • 24
16
votes
3 answers

Is it safe to type-cast TArray to array of X?

Today I discovered a compiler bug (QC#108577). The following program fails to compile: program Project1; {$APPTYPE CONSOLE} procedure P(M: TArray>); begin SetLength(M, 1, 2); end; begin end. The compiler gags on the SetLength…
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
16
votes
15 answers

Fatal Error: Cannot create output file "project1.exe"

So for some time now I keep having this problem: on windows 7 (64bit), with Delphi 7 and Delphi XE2, if from within the IDE, I compile a program, run it, stop it, change it and rerun it I get this error message: [Fatal Error] Cannot create output…
Marck
  • 686
  • 1
  • 5
  • 12
16
votes
2 answers

How I can patch a private method of a delphi class?

I have read these questions and answers How to change the implementation (detour) of an externally declared function Patch routine call in delphi but i can't figere out how patch a private method of a class located in anoher unit. Check this sample…
Salvador
  • 16,132
  • 33
  • 143
  • 245
15
votes
1 answer

How can I increase the size of the string that an external debugger visualizer can display?

I am once again writing an external debugger visualizer, and am running into a wall. There appears to be a limit to the size of the string that the debugger visualizer can return. The TStrings debugger visualizer that shipped with Delphi 2010 had a…
Cary Jensen
  • 3,751
  • 3
  • 32
  • 55
15
votes
4 answers

FillRect doesn't paint the complete TStringGrid cell in Delphi XE2

FillRect doesn't paint the complete TStringGrid cell in Delphi XE2. There is a gap of 3 pixels on the left side in the default color (with BiDiMode set to bdLeftToRight). This problem doesn't exist in Delphi 6 which I used before. procedure…
Finike
  • 151
  • 1
  • 4
15
votes
7 answers

Delphi App has "No Debug Info" when Debugging

We have built an application that uses packages and components. When we debug the application, the "Event Log" in the IDE often shows the our BPLs are being loaded without debug information ("No Debug Info"). This doesn't make sense because all…
James L.
  • 9,384
  • 5
  • 38
  • 77
15
votes
2 answers

RichEdit 2.0's usage of single CR character as linebreak throws off SelStart calculations (Delphi XE2)

When transitioning from Delphi 2006 to Delphi XE2, one of the things that we learned is that RichEdit 2.0 replaces internally CRLF pairs with a single CR character. This has the unfortunate effect of throwing off all character index calculations…
user1127813
  • 299
  • 3
  • 8