delphi

Delphi "EClassNotFound" errors, and corrupted DFM possibility (UPDATED)

I am getting a cascading set of "EClassNotFound" errors in in my Delphi 2007 project. Doesn't seem to be caused by the missing Name property value as often is the case, and though adding RegisterClass(XXX) in the initialization section(s) fixes the EClassNotFound error at hand, another one follows it seemingly indefinitely. I finally c...

Invalid Variant Operation Exception Trying to Access OleVariant in Delphi - Works in C#

I'm trying to access an OleVariant in a callback that is coming from an ActiveX library. Here's what the event handler is defined as in the TLB: procedure(ASender: TObject; var structQSnap: {??structVTIQSnap}OleVariant) of object; Here's the definition of structVTIQSnap in the TLB: structVTIQSnap = packed record bstrSymbol: WideSt...

Delphi code for sanitizing a URL entered by the user

I need a user to be able to enter a URL, and would like to make sure it is as wholesome as possible. Things like checking that there is http:// at the front, no double-dots, perhaps valid TLD, trailing slash (I have to add the final page). I figure this is such a common requirement that it must exist already. Suggestions? [edit:] To b...

How to find out who's causing an access violation error?

I'm getting reports that my app is causing a GPF on some Vista machines. The error message is something like this: access violation at 0x75784062 ( tried to write to 0x00000006) In order to fix this, I first need to know exactly who is causing this GPF: my main exe, some third party component, one of my own activex components, a dll, e...

why aren't descendants of TInterfacedObject garbage collected?

i have a class based on TInterfacedObject. i add it to TTreeNode's Data property. TFacilityTreeItem=class(TInterfacedObject) private m_guidItem:TGUID; m_SomeOtherNode:TTreeNode; public end; i create many instances of this object & had assumed that because they're reference counted, i shouldn't need to Free them. that'd be handy....

Delphi - Accessing a Frame object from a Form

Hi Excuse me if this is simple - I'm new to programming... I need to run an action that is attached to a button (say SQLBtn) that is placed on a Frame1 within my app, from Form1. I have included the frame in Form1 uses, but can't seem to address in any way. I've tried Frame1.SQLbtn TFrame1.SQLbtn TFrameSQLBtn etc but can't get to it. I ...

What is the proper way to update Delphi 2009's default installation of Indy 10?

Since Indy is now built-into the install process of Delphi 2009... is there a proper way to 'remove' it so it can be upgraded to the latest from the SVN repo? There isn't an automated option to remove it as far as I'm aware. ...

Why is Indy 9 included with Delphi 2009? Is it safe to use?

Why is there an Indy9 folder (The default install folder of C:\Program Files\CodeGear\RAD Studio\6.0\source\Indy contains subdirectories for "Indy9" and "Indy10") Why are both versions installed? What is using Indy9? I didn't think it had been updated for 2009...is Indy9 now safe to use with Delphi 2009? ...

Delphi 2009 and Synapse - tested and ready for Unicode support?

Is Synapse ready for a Delphi 2009 production applications? Their website doesn't look like it's been updated in a while: http://www.ararat.cz/synapse/doku.php Is the project dead? ...

Why IWSDLPublish interface is added to Win32 Delphi WebService

I've created a simple CGI application using Delphi 2009 that publishes a web service. When I point my web browser to the app, I can see my web service interface and another interface: IWSDLPublish. Why is this interface added to my web service? Do I need it? Is it possible to not publish this interface? Thanks. ...

SVN for Delphi Developers

I have posted a question before, Moving away from VSS, in which I asked about the best VCS control for Delphi developers who were using VSS. Most developers seem to use svn with TortoiseSVN. I tried this for few days and I think it's the best route to go with. However, I still have some confusion about the way that svn works so here a...

Delphi PDF generation

We're using Fast Reports to create reports but we're not very happy with the quality of the PDFs it creates. I know we can plug in other PDF components instead of the one that comes with FastReports so my question is What good PDF components are there out there (Free or Commercial) for Delphi? Ideally it should not require any dlls. Ed...

How to implement reference counted objects in Delphi

I have a graph like structure. I don't know exactly when to destroy the objects in traditional Delphi manner, instead I would like to implement something like reference counted objects. I know that I can use something like object.GetReference and object.Release instead of Free, and use a private variable for reference counting, but is th...

Can Intraweb Run More that 65,536 concurrent sessions?

Im trying to build a web-link to a busy social networking website using intraweb. Intraweb creates temporary folders for each session to store temporary files, which auto-delete when the session expires. If hosted on Win 32, the limit is 65,536 folders - which means only 65k concurrent sessions are possible. Is there a way to turn off...

Comparing issues in DUnit CheckEquals with Currency Field Values

I'm comparing some currency values in DUnit but it is not working at all on my machine (work on others, but not on mine). An example: CheckEquals(16.65, SomeCurrencyFieldValue); Raises: expected: <16,65> but was: <16,65> if do the following the comparison then works: var Temp: Currency; begin Temp := 16.65; CheckEquals(Temp...

Delphi History - Source Control

After reading some posts here on the advantages of using source control for a single developer, it seems to me that the main advantage is that I will have backups of all changes to the source files. Delphi has a built-in history function that does this by default. Is this really the same or should I use a "real" source control tool inst...

Is there .NET equivalent to Delphi's ActionList?

We're currently using Delphi 5 and Delphi 2005 for development, and investigate of going the .NET route via Delphi Prism. Is there a .NET equivalent to Delphi's ActionList? For those not familiar with ActionList, it's a component that contains a collection of actions that we create, e.g. Save, Refresh, Load, etc. Each action can have ...

Is it possible to select multiple columns in Virtual Treeview?

I need to add functionality to a copy a rectangular selection of nodes and columns, but I can't find any way to actually select multiple columns in Virtual Treeview (beside toFullRowSelect). Am I just missing something? and if not, is there a descendant out there with grid-like multicolumn select support? ...

How can I check that Properties linking to components is not "lost"?

I'm using Delphi 2007. Sometimes properties linking to components get lost. This is typically Action properties and lookupdatasets. I have a few times had some emergency bug fixes and sent out a version to customers with a somewhat catastrophic result due to this :-) Anyone know a way to verify that properties that are supposed to be set...

Audio file tagging (read/write) library?

TagLib seems like a good choice, but I don't use C++ and bindings for other languages are limited. Currently I use the ATL library, but it hasn't been maintained since 2005 and I'm having a hard time doing this myself. So I'm looking for another open source alternative that is actively developed. Do you know of one? ...