Which language elements can be annotated using attributes language feature of Delphi?

Interesting question! You can declare attributes on almost anything, the problem is retrieving them using RTTI. Here’s a quick console demo of declaring custom attributes for: Enums Function type Procedure type Method type (of object) Aliased type Record type Class type Record type that’s internal to a class Record field Record method Class instance field … Read more

What is TMonitor in Delphi System unit good for?

TMonitor combines the notion of a critical section (or a simple mutex) along with a condition variable. You can read about what a “monitor” is here: http://en.wikipedia.org/wiki/Monitor_%28synchronization%29 Any place you would use a critical section, you can use a monitor. Instead of declaring a TCriticalSection, you can simple create a TObject instance and then use … Read more

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

My list: The Dev.Express Quantum grid: enhanced grid component: once you get the hang of this component, you can use it in all sorts of scenarios (at least I have) Dev.Express Quantum Tree list: if you know the grid component, you can use this component as well (treelist and grid combined) Dev.Express Express bars: menu … Read more

How hard is it to migrate a project from Delphi 7 to Delphi XE?

The only real problem is conversion to Unicode. You should learn how Unicode support is implemented in Delphi – start from Marco Cantu White Paper: Delphi and Unicode It is impossible to estimate the amount of work required to upgrade old applications to Unicode without knowing the actual code. If you were using string types … Read more

TThread.resume is deprecated in Delphi-2010 what should be used in place?

Charles if do you read the code of TThread class , do you find the answer. TThread = class private type .. .. .. public constructor Create(CreateSuspended: Boolean); destructor Destroy; override; procedure AfterConstruction; override; // This function is not intended to be used for thread synchronization. procedure Resume; deprecated; // Use Start after creating a … Read more

Delphi 2006-2010 error: “Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr”

There are three solutions to this that I am aware of: Try uninstalling the Windows security update KB2982791 which was already mentioned by Francisco Caffagni. This solved the issue for me (Windows 8.1 + Delphi 2007) but it might not be such a good idea to uninstall a Windows security update. Rename the file every … Read more

How should I prepare my 32-bit Delphi programs for an eventual 64-bit compiler? [duplicate]

First up, a disclaimer: although I work for Embarcadero. I can’t speak for my employer. What I’m about to write is based on my own opinion of how a hypothetical 64-bit Delphi should work, but there may or may not be competing opinions and other foreseen or unforeseen incompatibilities and events that cause alternative design … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)