delphi

Bad reference to an object already freed

Is there a way to be sure we hold a useable reference to an object i.e. being sure it has not been already freed leaving that non nil reference dangling. ...

How to check if an OLEDB driver is installed on the system?

Hi! How can I make sure that a certain OLEDB driver is installed when I start my application? I use ADO from Delphi and would like to display a descriptive error message if the driver is missing. The error that's returned from ADO isn't always that user-friendly. There are probably a nice little function that returns all installed drive...

How copy Delphi TTable including calculated fields

I have defined a Delphi TTable object with calculated fields, and it is used in a grid on a form. I would like to make a copy of the TTable object, including the calculated fields, open that copy, do some changes to the data with the copy, close the copy, and then refresh the original copy and thusly the grid view. Is there an easy way ...

Delphi: Paradox DB Field Name Issue (Spaces in field name)

I have a paradox table from a legacy system I need to run a single query on. The field names have spaces in them - i.e. "Street 1". When I try and formulate a query in delphi for only the "Street 1" field, I get an error - Invalid use of keyword. Token: 1, Line Number: 1 Delphi V7 - object pascal, standard Tquery object name query1. ...

Delphi 2009 TurboPower library conversions

In the next few months I will be resurrecting a project which made extensive use of Orpheus and SysTools. The development system I used is long gone, so would like to update the libraries to my current development environment. My question(s): is anyone porting, or has anyone ported the TurboPower libraries to Tiburon, if so did you enco...

delphi "Invalid use of keyword" in TQuery

I'm trying to populate a TDBGrid with the results of the following TQuery against the file Journal.db: select * from Journal where Journal.where = "RainPump" I've tried both Journal."Where" and Journal.[Where] to no avail. I've also tried: select Journal.[Where] as "Location" - with the same result. Journal.db is a file created by a...

Replace visual component at runtime in Delphi (win32)

Is it possible to, for instance, replace and free a TEdit with a subclassed component instantiated (conditionally) at runtime? If so, how and when it should be done? I've tried to set the parent to nil and to call free() in the form constructor and AfterConstruction methods but in both cases I got a runtime error. ...

Is Delphi still a viable choice for development?

... can this still be a good career choice? ...

A Delphi/FreePascal lib or function that emulates the PHP's function parse_url

I'm doing a sitemap producer in Object Pascal and need a good function or lib to emulate the parse_url function on PHP. Does anyone know of any good ones? ...

Delphi 2009 + Unicode + Char-size

Hello! I just got Delphi 2009 and have previously read some articles about modifications that might be necessary because of the switch to Unicode strings. Mostly, it is mentioned that sizeof(char) is not guaranteed to be 1 anymore. But why would this be interesting regarding string manipulation? For example, if I use an AnsiString:='Tes...

How can I debug a C# COM assembly when it's being called from a native win32 application?

I'm developing a C# assembly which is to be called via COM from a Delphi 7 (iow, native win32, not .net) application. So far, it seems to work. I've exported a TLB file, imported that into my Delphi project, and I can create my C# object and call its functions. So that's great, but soon I'm going to really want to use Visual Studio to ...

How do you like the new Ribbon Controls in D2009?

How do they compare to the DevXpress ones or the original MSOffice ones. Are they worth investing time in them (for practical usage now, not academic curiosity which I'll do anyway)? ...

JQuery TypeWatch Functionality in Delphi

TypeWatch is a JQuery plugin that monitors the time between key strokes in a text input box. It allows for features like refreshing of search results as a user types their search terms, as demonstrated in the 'Users' page in Stack Overflow. If you are typing in the name of a user you wish to seach for and pause typing for half a se...

Convert console exe to dll in C

I am interested in calling SoX, an open source console application, from another Windows GUI program (written in Delphi naturally). Instead of dealing with scraping and hiding the console window, I would like to just convert the application to a DLL that I can call from my application. Before I start down this path I am curious how m...

Can you Catch an Exception after the main application unit has ended?

In one of our application im getting an exception that i can not seem to find or trap. ... Application.CreateForm(TFrmMain, FrmMain); outputdebugstring(pansichar('Application Run')); //this is printed Application.Run; outputdebugstring(pansichar('Application Run After')); //this is printed end. <--- The Exception seems to b...

Delphi 7 make complains about files not found

I've got a BPG file that I've modified to use as a make file for our company's automated build server. In order to get it to work I had to change Uses * Uses unit1 in 'unit1.pas' * unit1 unit2 in 'unit2.pas' * unit2 ... * ... in the DPR file to get it to work without t...

Is it expected that all the units of a Project Group in Delphi 7 to be in one folder?

Maybe this applied to other Delphi's (I've only used 7). We've got our code broken up so that nearly every DLL in our fairly massive app is in a different folder. 99% of the open source stuff I've downloaded to plug into Delphi have had all their source munged into one folder. It seems like this was an assumption that the developers o...

I can't include a version number in this old Delphi project I inherited. How do I fix it?

I have an old Delphi codebase I have to maintain, lots of DLLs, some older than others. In some of these DLLs there is no version information in the Project Options dialog. The controls for adding a version are greyed out and I can't even add a version number by manually editing the .DOF file. How can I include a version number in these ...

Is putting thread on hold optimal?

Application has an auxiliary thread. This thread is not meant to run all the time, but main process can call it very often. So, my question is, what is more optimal in terms of CPU performance: suspend thread when it is not being used or keep it alive and use WaitForSingleObject function in order to wait for a signal from main process? ...

Is there an easy way, to Port a Win32 App in Delphi 2009 to .NET ?

We want migrate from Delphi 7.0 to Delphi 2009, to stay up with a modern IDE and current technology. Our target platform is .NET. What is best way, to achieve this goal? ...