Questions tagged [delphi-xe]

Delphi XE is a specific version of Delphi. Delphi XE was released in August 2010, and is available as a standalone product or as part of RAD Studio XE.

Delphi XE is a specific version of Delphi.

Delphi XE was released in August 2010, and is available as a standalone product or as part of RAD (rapid application development) Studio XE.

Delphi XE code name is Fulcrum, compiler version 22, directive symbol VER220.

Speculation about Delphi XE prior to its release often referred to this release as Delphi 2011.

Delphi XE was preceded by Delphi 2010 and succeeded by Delphi-XE2

1495 questions
13
votes
3 answers

How can I convert from generic to Variant in Delphi

I have a Delphi generic class that exposes a function with an argument of the generic type. Inside this function, I need to pass an instance of the generic type on to another object expecting a Variant type. Similar to this: type IMyInterface =…
Mathias Falkenberg
  • 1,110
  • 1
  • 11
  • 25
13
votes
5 answers

Delphi XE and Trapping Arrow Key with OnKeyDown

I want my form to handle the arrow keys, and I can do it -- as long as there is no button on the form. Why is this?
Jeff Bannon
  • 233
  • 1
  • 3
  • 11
13
votes
2 answers

How to change the implementation (detour) of an externally declared function

I have a third party function function DataCompare(const S1, S2: string; APartial: Boolean): Boolean; begin ... end; It is used in another third party unit. I wish to replace the body of the function at runtime with another new…
Gad D Lord
  • 6,620
  • 12
  • 60
  • 106
13
votes
2 answers

Delphi GUI Testing and Modal Forms

In this interesting blog post on delphiXtreme I read about DUnit's built-in GUI testing capabilities (basically an alternative test case class TGUITestCase defined in unit GUITesting that has several utility functions for invoking actions in the…
jpfollenius
  • 16,456
  • 10
  • 90
  • 156
13
votes
3 answers

What specifically causes EPrivilege to be raised?

I'm getting a bug report that some functionality in some music-playing code in an external DLL (SDL_Mixer, in case it helps) that my program uses is raising EPrivilege. The DLL is written in C, so I can't get useful stack trace information out of…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
13
votes
4 answers

What's the cost of reraising an exception?

Is this try DoSomethingThatMightThrowAnException; except on E : ESyntaxError do begin if (E.ErrorCode = errMissingBracket) then HandleError else raise; end; end; slower than this? try …
jpfollenius
  • 16,456
  • 10
  • 90
  • 156
13
votes
4 answers

How read the content of file to a string in delphi XE

I'm migrating my application from delphi 2007 to delphi xe, but i having problems with a procedure which read a file (ascii) and store the content in a string this is the code which work ok in delphi 2007 function LoadFileToStr(const FileName:…
DelphiNewbie
  • 769
  • 3
  • 9
  • 14
13
votes
3 answers

Build event macros in Delphi XE

According to Delphi's help file, when I open the dialog box to add build events to my project's options, the dialog box should show a list of macros (placeholders) that I can use on the command line for the build event. When I try this in Delphi…
Jan Goyvaerts
  • 21,379
  • 7
  • 60
  • 72
12
votes
2 answers

How instruct to the Delphi IDE refresh the modified syntax highlight colors using OTA (Open Tools API)?

I'm writting a plugin to integrate the Delphi IDE Theme Editor with the Rad Studio IDE (the current version of this tool run as an external application) so far everything is working fine (see the below image), except the fact which I can't figure…
RRUZ
  • 134,889
  • 20
  • 356
  • 483
12
votes
2 answers

SOAP client in Delphi "The handle is in the wrong state for the requested operation"

I have built the worlds dumbest and most simple SOAP server, in about 3 clicks, in visual studio. The exact steps in visual studio 2010: First create a new project as a web application, Then add a new item of type web service. (See accepted answer…
Warren P
  • 65,725
  • 40
  • 181
  • 316
12
votes
3 answers

Efficiently Computing Text Widths

I need to compute the width of a column with many rows (column AutoSize feature). Using Canvas.TextWidth is far too slow. Current solution: My current solution uses a text measurer class that builds a lookup table for a fixed alphabet once and then…
jpfollenius
  • 16,456
  • 10
  • 90
  • 156
12
votes
3 answers

Compiler warning "return value might be undefined"

I often use code along the lines of: function GetNumber(Handle : THandle) : Integer; begin FLock.BeginRead; try if FMap.TryGetValue(Handle, Object) then raise EArgumentException.Create('Invalid handle'); Result := Object.Number; finally …
jpfollenius
  • 16,456
  • 10
  • 90
  • 156
12
votes
5 answers

Synchronizing/sending data between threads

The app is written in Delphi XE. I have two classes, a TBoss and TWorker, which are both based of of TThread. The TBoss is a single instance thread, which starts up and then will create about 20 TWorker threads. When the boss creates a instance of…
Wizzard
  • 12,582
  • 22
  • 68
  • 101
12
votes
5 answers

Delphi can't find System.dcu; what should the default path settings be?

Got this error whenever I try to compile something: "F1027 Unit not found: 'System.pas' or binary equivalents (.dcu)". Got it after installing a component, removed it, reinstalled RAD studio, but still same. In order to get it fixed, I need the…
pop33
  • 135
  • 1
  • 1
  • 5
12
votes
1 answer

JSON vs XML parsing speed in Delphi

We are creating an application that uses a lot of XML parsing and I thought maybe to use JSON, because we can use JSON as an alternative to XML. I need to test which is faster JSON or XML, but thought to ask an opinion here first. JSON in…
evilone
  • 22,410
  • 7
  • 80
  • 107