delphi-2010

How to implement automatic replacement of typos in Delphi2010

I am looking for a way to develop a plugin for Delphi 2010IDE and have yet to find any information on that topic, not even on how to get started. What I want to accomplish is some kind of auto-spellchecker wich can be given a list of common typos (flase instead of false, .cerate instead of .create and the like) and replace them with the...

How to create an instance of object with RTTI in Delphi 2010?

As we all known, when we call a constructor of a class like this: instance := TSomeClass.Create; The Delphi compiler actually do the following things: Call the static NewInstance method to allocate memory and initialize the memory layout. Call the constructor method to perform the initialization of the class Call the AfterConstructi...

delphi 2010 datasnap return treeview from server

Hello To All: is it possible in Delphi Datasnap 2010 to transfer treeview from Datasnap 2010 server to DataSnap Client? thanks ...

Register custom form in delphi 2010 with ToolApi

Hi, I have custom form which is descendant from TForm. I used ToolApi to register custom module and add it to repository. So far so good. But when I click on File->New I can see my category with icon for my custom form but it is disabled. Icon is grayed and I cannot select it to create my custom form from menu and add it to project. ...

Delphi conditional compiling

Hello there, I need to know if is there any option to compile a delphi project only if the source or any used unit, package etc has been changed. If this is not possible, second alternative : Is there any option to generate exactly the same binary compiling two times the same project. Thanks. Edit: The usage is for a hash based WebUp...

Why TCategoryPanel.controls[i].className always "TCategoryPanelSurface?

On a form I put down 1 x TCategoryPanelGroup object and added 3 TCategoryPanel to it. In a routine, I need to go through each of TCategoryPanel and through each object onto those panel to produce an output. So, here is the code ... why into the second FOR instead of giving me classname of each component (i.e. TButton, TLabel, etc) it gi...

Binary version of StringReplace

I'm trying to run AnsiStrings.StringReplace on a RawByteString holding a blob of data, some of which needs to be replaced. It would work, except that inside StringReplace it converts my string to a PAnsiChar, and so the search ends up bailing out as soon as it hits the first #0 byte inside the blob. I'm looking for a routine that works...

Delphi 7 Enterprise or Delphi 2010 Professional

At work I have used Delphi 6 & 7 Enterprise for several years. A few years back, I bought a personal copy of Turbo Delphi Professional. Because of this I am eligible for Delphi 2010 Professional upgrade. But I am not eligible for Delphi 2010 Enterprise upgrade though. Is it worth buying Delphi 2010 Professional Upgrade or should I look...

Passing a reference to a TObjectDictionary<TKey, TValue>.TValueEnumerator

Hi All, I am trying to use Delphi 2010's TObjectDictionary generic. I would like to pass an enumerator of the Values property of that generic class, and the compiler doesn't seem to want to let me... Example: TAttributeStates = class(TInterfacedObject, IAttributeStates) private FStates: TObjectDictionary<TPatchAttribute, TAttr...

Ugly "disabled" images of TMainMenu

Delphi 2010, Win32 VCL. I need to create a main menu for my application with the most standard look. TMainMenu looks nice in all Windows versions, the only bad thing is when it displaying images for items with Enabled=False. Delphi has some strange method for building that disabled images (b/w extrusion with bevels, for me it looks lik...

delphi datasnap 2010 from server to client file transfer

Hello To All: Have anyone tried to transfer file from Server to Client? or Transferring XML from Server to Client? Can anyone a running code for this? thanks and best regards, btw, how could I post an answer? ...

delphi DataSnap 2010 Stream File working Sample

Hello To All: I am trying to stream an XML File from Server To Client using DataSnap, with the help of ldsandon, i was able to download the sample from embarcadero, but my problem is I cannot follow it. a pseudo of the program should work this way. client will request from the server for selected xml file in the combobox. the server w...

Delphi 2010 freeze on start-up

I've set up trial Delphi 2010 for the testing. After some days it is started and freeze. I just can see web-page with "how-to-buy" and at the right side last edited project. But Delphi's window do not react on any mouse events. I've tried to reinstal and repair it. So... What I have to do? May be that project have bad files or some set...

Code Insight (IntelliSense)

I am trying to add a description to functions I developed - I want this description to display in code insight when another developer is using my units or when a user uses API/COM to connet and uses our software. At the moment all they see is e.g. Function name and return type but they have no idea what the function does exactly. in C# ...

Reading the output file of ShellExecute() in Delphi 2010?

I use the ShellExecute command to run an exe file which gets an input text file and returns an output text file. I've written it like this: ShellExecute(mainFormHandle, 'open', 'Test.exe', 'input.txt output.txt', nil, sw_shownormal); //Read the output file... S_List.LoadFromFile('output.txt'); Writeln(S_List[0]) I provide the inp...

Making a custom control more testable in TestComplete

(This might be better in the TestComplete forums, but I thought I'd give it a shot here anyway) We are looking in to automated testing of our Delphi 2010 application with TestComplete. The main control that our application uses is our own custom control that derives directly from TCustomControl. (For reference the control is like a ...

How to set breakpoint in Delphi JVCL units ?

I'm debugging a Delphi code that use TJvProgramVersionCheck component from the excellent JVCL libs. So I'd like to put a breakpoint somewhere in JvProgramVersionCheck unit but it doesn't work. The breakpoint icon show a cross - not active ! I tried to put a breakpoint when calling the TJvProgramVersionCheck method, do a debug "Step int...

Files built with Delphi 2010 report virus/trojan

I tried to email a DLL-file built with Delphi but received an rejection email reporting: "Your email was rejected because it contains the Trojan.Delf-9364" So I uploaded the file to http://scanner.novirusthanks.org and sure enough it reports a positive in one of the virus scanners: "F-PROT6 20100630 4.5.1.85 W32/Swizzor-based.2!Maxi...

Better way to implement filtered enumerator on TList<TMyObject>

Using Delphi 2010, let's say I've got a class declared like this: TMyList = TList<TMyObject> For this list Delphi kindly provides us with an enumerator, so we can write this: var L:TMyList; E:TMyObject; begin for E in L do ; end; The trouble is, I'd like to write this: var L:TMyList; E:TMyObject; begin for E in L.GetEn...

Recording and saving .wav Files with TMediaPlayer (Delphi 2010)

Hello people, well im really new to the delphi world. Right now im using the TMediaPlayer to record some sound and save those. I made a click event for the record button in the TMediaPlayer which executes a SaveFileDialog. The user should type in some filename he would like to save and then after recording the .wav file he can click on...