delphi-2010

How make C++ Builder 2010 just install the professional edition where once an Architect edition

In the computer, there is an C++ Builder 6 and was an C++ Builder Architect (the license isn't owned by the company) which was uninstalled. I received the mission to install C++ Builder Professional 2010 recently bought on that machine, but the installer of the ISO (downloaded from Embarcadero) insists on installing the Architect editi...

How can I access/modify headers of request/reponses in a Delphi 2010 DataSnap Server

I'm in the process of building a DataSnap Server that functions as WebDAV server and I'm trying to read the request headers when using a DSHTTPService and then modify the response headers. Can anyone point me in the right direction? I've notice the Trace TDSRequest and TDSResponse are ancestors of TDSRequestIndy and TDSResponseIndy and...

How to debug a COM dll in Delphi ?

Hi, I try to debug a COM dll (TAutoObject) in Delphi and my break point are not green. I put my option like this : host : c:\Program Files\Internet Explorer\iexplore.exe param : c:\software\test.html My test is well lanched but no breakpoint in Delphi what is the way to to this ? ...

Invalid pointer operation in TMonitor.Destroy

I'm currently working on porting an existing Delphi 5 application to Delphi 2010. It's a multithreaded DLL (where the threads are spawned by Outlook) that loads into Outlook. When compiled through Delphi 2010, whenever I close a form I run into an "invalid pointer operation" inside TMonitor.Destroy... the one in system.pas, that is. ...

How can I set the $RTTI directive for the entire project?

I'm working on migrating an old project from Delphi 2007 to Delphi 2010. One thing I've found is that the resulting executable has more than doubled in size, and the original was already quite big. (Over 50 MB.) I suspect that a lot of it has to do with extended RTTI. Since the project predates Delphi 2010, it doesn't use extended RT...

Delphi - undeclared identifier: LOCALE_SYSTEM_DEFAULT

Hi all, I'm trying to format a float (extended) by the system locale's default currency settings. I have found the key proponent to this solution to be the following line: GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, format_settings); and everywhere I look, they provide the solution exactly as shown (no class specifier before, li...

Set the name of a thread created with SetTimer() API

I create a Windows timer using the following FHandle := SetTimer(0, 0, 1000, TFNTimerProc(@TMyClass.MyMethod)); Is this thread shown in the Delphi "Threads" window. If Yes how I can get this Thread ID? ...

Delphi pre-build event not executing BEFORE compile

I'm busy automating our builds to include the svn revision number. We're using Delphi 2010. I added a pre-build event calling a batch file that injects the the svn revision number (read from the entries file in the .svn directory) and a specified version number into aVersionInfo.rc that is compiled with my project. The pre-build event ...

Are there issues with running the Delphi 2007 and Delphi 2010 IDEs on Windows 7?

The Windows Upgrade Advisor has told me there are 'known' issues with running Delphi 2010 on Windows 7, but I can't find them, does anyone know if there are, or if they've been fixed already? ...

Delphi form Owner Skips ShowMessage/Dialog call in component's FormClose

Hello, My Delphi 2010 application has a number of non-modal forms that are created and owned by the mainform. One of these forms has a formclose procedure that pops up a dialog asking the user if they want to save changes. If the user closes the mainform, the "owned" form's FormClose procedure is called, however the dialog is not shown...

Howto set event handlers with arbitrary type with RTTI in Delphi 2010 ?

Hi, after reading the post How to set event handlers via new RTTI?, I wonder if it is possible to solve this more dynamically. For example I want to set ALL event handlers of any component to nil. Using TValue.From <TNotifyEvent> (SomeMethod) does not work for two reasons: 1. The type is unknown (could be TNotifyEvent, TMouseEvent etc....

D2010: Format only selected text?

Is there any way the Format Source (CTRL+D) command applies only to the selected text (or the current method the caret is in)? I'm asking this because the formatter is quite buggy (ok, actually useless) when anonymous functions are used anywhere in the module to be formatted. ...

What components and IDE add-ins do you install with Delphi?

After a clean install of Delphi, what components and IDE add-ins do you make certain that you install? What's your Delphi "rig"? Here's what I install after a clean installation: Delphi 2007 / Delphi 2010 JCL / JVCL - JEDI Code Library and JEDI Visual Code Library (600+ components) JWA / JWSCL - JEDI API Library & Security Code Library...

Problem with Indy IdHttp Post in Delphi 2010

I have problem with Indy IdHttp Post method. Function CallRpc() compiled with Delphi 2007 works fine but same code compiled with Delphi 2010 raises exception. What do I have to consider when I change Delphi 2007 Indy TIdHttp to Delphi 2010 Indy TIdHttp? function CallRpc(const sURL, sXML: string): string; var SendStream : TStream; ...

Zoom to full screen ?!?

How to activate/use this feature in D2010 ?!? I have checked Zoom to full screen in Tools > Option > Editor Option > Display clicked Ok button but nothing happened. Ok, i said to myself, let's see what the help has to say about this. I pressed F1 key, wait a little, help's coming up but as i have expected, it has no idea about this, iro...

Problem with RadioGroup.ControlCount in Delphi 2010

I'd like to set RadioButton properties in runtime in procedure InitRadioGroup(). It fails because RadioGroup.ControlCount is 0, although there are 3 RadioButtons in RadioGroup. What is wrong in D2010 RadioGroup? Same code works fine in Delphi 2007. procedure InitRadioGroup(RadioGroup: TRadioGroup); var i: integer; RadioButton: T...

How to start building a searchable garbage collector in Delphi (2009-2010)

I'm looking for a way to control all business objects I create in my applications written in Delphi. As an article on Embarcadero's EDN (http://edn.embarcadero.com/article/28217) states, there are basically three ways to do this. I'm mostly interested in the last one, using interfaces. That way, when the business object is no longer bei...

no RTTI on unamed data types

Hi, AFAIK the compiler does not generate RTTI if the type is not named. eg: T = array[0..1,0..1] of Integer; In this case it is possible to know the total size of the array, but it is impossible to know the size of each dimension. It works only if I use a type explicitly named: T01 = 0..1; T = array[T01,T01] of Integer; I missed somet...

Delphi 2010 RTTI : Use TValue to store data

Hi, I would like to be able to use TValue to store Data in a TList<>. Like in : type TXmlBuilder = class type TXmlAttribute = class Name: String; Value: TValue; // TValue comes from Rtti end; TXmlNode = class Name: String; Parent: TXmlNode; Value: TXmlNode; Attributes: TList<TXmlAttr...

Compile Delphi component package (bpl) for different Delphi versions

Hello. The situation is the following. Typically I use RAD Studio 2010 for Delphi development. I have some components I would like to redistribute in binary form (*.bpl without source). But I would like people to be able to use them despite of their Delphi version. But, for example, dcu files can be used only by compiler version, which...