delphi

Delphi: EReadError with message 'Property Persistence does Not Exist'

My program written with Delphi 7 compiles OK, but when I run it it gives me the error message: Project1.Exe raised exception class EReadError with Message 'Property Persistence does Not Exist'. Process Stopped. This only started after I installed the TMS Component Pack to use with this project. Thanks for any help. ...

Descendant of TThread, accessing properties from main thread

I have a class which is a descendant of TThread. I have some public properties that are read only. Will I run into problems if my main thread reads those values while the thread is active? ...

How to make WMV compression using ASF Writer faster ? Any hints ?

I'm compressing raw AVI files to WMV using the ASF Writer. I'm in a big need to make the compression faster. There are any hints & best practicevs on how to achieve this ? Drop/lower the indexer impact ? Any hidden compression parameters ? The files contains just video in RGB/24bits format and the compression level for the video stream...

Delphi EXE compressor?

At one point I had a nice little compression utility that smashed my Delphi compiled EXE's to a smaller download size, but now I can't find it. Any recommendations? Also, are there any downsides to using these kinds of utilities? (I mainly use them to shorten download times for rural / dial-up users). Related question: Are there an...

Hosting CLR versus using ClrCreateManagedInstance - what are the benefits?

I have successfully implemented interop beftween Win32 application and managed .Net dll as described here. But I also read here that it is possible to host the entire CLR inside of the unmanaged process. So my question is: why would you do that? It is somewhat more complex than just use an object - what benefits you gain for this price ...

Looking for a PHP and/or Python RAD

I am looking for RAD like environment for PHP and/or Python free or not does not matter. It should have a visual environment where one can use a point and click interface so that it is possible to select objects with mouse and move them around. I have looked at Delphi4PHP. The RAD part is fantastic, but I don't like the framework on wh...

Scope of anonymous methods

One nice thing about anonymous methods is that I can use variables that are local in the calling context. Is there any reason why this does not work for out-parameters and function results? function ReturnTwoStrings (out Str1 : String) : String; begin ExecuteProcedure (procedure begin Str1 := ...

Emulate incoming network messages for Indy

Is it possible to emulate incoming messages using Indy (if it's of any importance: I'm using Indy 10 and Delphi 2009)? I want to be able to create these messages locally and I want Indy to believe that they come from specific clients in the network. All the internal Indy handling (choice of the thread in which the message is received and...

Size of generic type

Is there any way to determine the size in bytes of something like TItem <T> = record Data : T; end; Can I write something like function TItem <T>.GetByteSize : Integer; begin if (T = String) then Result := GetStringByteSize (Data as String) else Result := SizeOf (Data); end; or perhaps with the help of specialization? functi...

Multiple app windows activation not working correctly

I have a Delphi application that has a document browser as the main form. When the user opens a document, we open an editor window. We want to have each editor with a button on the task bar, as well as the main form. I've applied the normal code to do this (below), but when I click on the main form after using the editor window the edito...

simple calculation, different results in c# and delphi

Hello, The question is, why do these code snippets give different results? private void InitializeOther() { double d1, d2, d3; int i1; d1 = 4.271343859532459e+18; d2 = 4621333065.0; i1 = 5; d3 = (i1 * d1) - Utils.Sqr(d2); MessageBox.Show(d3.ToString()); } and procedure TForm1.InitializeOther; var d1, d2, d3 : Double;...

Problem starting program with a dll embedded as a resource

I've done About.com guide to embedding dll's in Delphi EXE's which seems to work, so long as I don't actually use the DLL as an external function. Is there anyway to get the code I linked to to work earlier than an unit referenced in the uses clause. I've tried: Doing exactly what this code says. Placing this code in the initializati...

How to spawn Linux process from Windows application?

My interactive 32-bit Windows app (now moving from Delphi [Ent] 2007 to 2009) uses command-line interactions to spawn child processes that do computationally-intensive tasks, which in turn write text files that the GUI parent app parses and analyzes - resulting in an interactive graphical display of the results. I have access to a multi...

In delphi 7, is `try ... except raise; end;` meaningful at all?

In some Delphi 7 code I am maintaining, I've noticed a lot of instances of the following: with ADOQuery1 do begin // .. fill out sql.text, etc try execSQL; except raise; end; end; It seems to me that these try blocks could be removed, since they do nothing. However, I am wary of possible subtle side-effects.. Can any...

Will Delphi be there in future ?

Yes, there is a version 2009. I know Delphi has a big community since years (10 plus)and I believe you could create native windows exe before Visual Basic got to speed (with all its dll's nighmare). But is it future-proof ? Is there a need or market for a non-crossplatform native all-in-one executable ? Will Embarcardero ex Codegear ex B...

Conditional behaviour based on concrete type for generic class

Since my question from yesterday was perhaps not completely clear and I did not get the answer I wanted, I will try to formulate it in a more general way: Is there a way to implement special behaviour based on the actual type of an instantiated generic type either using explict conditional statements or using some kind of specialization...

Delphi: F2084 Internal Error T2575

Do anybody know what this error means? It comes and goes in one of my units. Adding a space or a lineshift will sometime solve it, sometime not... I'm using Delphi 2007. ...

ReportBuilder 7.x - Controlling Print to File at Print Time

Using ReportBuilder 7.X Question Is it possible to Control Print to File. I need to change the Length of a field at print time Example: label2 In the setup - I set its length to 800 which is the max possible this field should ever be. However, in many cases the record is less than that and i need to set it to the calculated size be...

How can I communicate with WCF from Delphi using Named Pipes Binding

Can I use Delphi 2007 to communicate with a WCF service using the netnamedpipebinding ? If so, then how? ...

FxCop / StyleCop for Delphi?

Does anyone know of an equivalent to FxCop/StyleCop for Delphi? I would really like to get the automatic checking of style, etc. into Continuous Integration. ...