Hello again! I'm back with another question concerning threads and synchronization. Imagine a server application that has to perform a lengthy operation and the client wants his GUI to remain responsive while he waits for the server's response. I thought of the following pattern:
TMonitor.Enter (FTCPClient);
try
WorkerThread := TWorke...
Hello,
I have this code
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var
begin
if not (Key in [Ord('0')..Ord('9')]) then
Key := 0;
end;
and it worked fine with Delphi 2007. When I upgraded to Delphi 2009 and I try to press any letter it is accepted and the Key := 0 does not trap the input?
...
We have recently moved to Delphi 2009. I can't find the TShellListView and TShellTreeView controls. Do I need to install something extra?
From searching the web it seems they are shipped with Delphi 2009 but for some reason they havent been installed.
Has anyone had a similar problem?
Update:
This is so unbelivably idiotic. It ap...
I want to use Vista Large Icon feature in my Delphi 2009 application, but I can only embed the normal 32x32 icon in my application. How can I make application have many sizes of Icons?
Thanks
...
I am trying to create a generic list class for use with tiOPF (an Object Persistence Framework for delphi @ www.tiopf.com). Specifically I am trying to take an existing generic class (TtiObjectList) and make a generic version that uses TtiObject descenants.
I have limited scope for altering the base classes as they need to compile und...
i have a very interesting problem.
background
i've used TTreeView for years but only now am using it with a docking library (from AutomatedQA). i've learned that when the parent of the TTreeView is changed, all the handles are recreated. this is something the docking library does during normal activites.
i've been using the Data p...
type
TStaticArray = array[1..10] of integer;
TDynamicArray = array of integer;
TMyClass = class(TObject)
private
FStaticArray: TStaticArray;
FDynamicArray: TDynamicArray;
published
property staticArray: TStaticArray read FStaticArray write FStaticArray; //compiler chokes on this
property dynamicArr...
Hello,
I'm extensively using hash map data structures in my program. I'm using a hash map implementation by Barry Kelly posted on the Codegear forums. That implementation internally uses RTL's CompareText function. Profiling made me realize that A LOT of time is spent in SysUtils CompareText function.
I had a look at the
Fastcode site...
I'm testing DelphiModbus library on Delphi 2009 and don't get quite the results I want. I think the problem lies with the following line on IdModbusClient.pas:
Move(Buffer, ReceiveBuffer, iSize);
It looks like ReceiveBuffer is set to some garbage.
Buffer is defined as TIdBytes (from Indy components)
ReceiveBuffer is defined as TComm...
Hi.
I have a structure like below that needs to be saved and loaded from disk.
RSecStructure= packed record
Name : string[255]; {NEED UNICODE SUPPORT HERE}
ScreenName : string[255];
OrigFileName : string[255];
Prim : string[255]; ...
Hi all,
How can i connect to a server through a http proxy server in delphi?
What about SOCKS5 proxy?
Google doesn't have any suggestion!
...
What component should I use to display a PDF file in a Delphi 2009 application?
EDIT:
I have been using PDF Viewer by Synactis - a very nice free PDF Viewer
But it has no Delphi 2009 support.
So I need to designing it out of the product
...
Hi.
I have lots of components that worked perfectly under D7.
I managed to compile and install them by dragging them into the Delphi 2009 IDE.
However, when I try to use those components in a project, the compiler says it cannot find the source code of them.
Where I can enter the path to that library?
Solution:
I dragged and dropped...
I've found that when I take a simple form containing only a ribbon bar and a status bar, it's cutoff. The control you see above the status bar was later removed. The same cutoff occurs whatever control happens to be present. Later I removed the status bar & put a memo control there instead with the same result.
without ribbon bar:
wit...
I have code like this:
type
TMyDictionary = TDictionary<int, int>;
var
myDict: TMyDictionary;
k, v: integer;
// code to fill the dictionary
for k in myDict.Keys do
begin
v := myDict.Items[k];
// other stuff
end;
Randomly I see an exception thrown on 'v := myDict.Items[k];' which says k is invalid.
Anyone e...
I have just written my own logging framework (very lightweight, no need for a big logging framework). It consists of an interface ILogger and a number of classes implementing that interface. The one I have a question about is TGUILogger which takes a TStrings as the logging target and synchronizes the logging with the main thread so that...
We implemented a small application that uses the SOAP interface from Mantis Bugtracker (http://mantisbt.sf.net/). Mantis is installed on an SSL webserver that requires HTTP authentication.
It works perfectly in Windows XP, but not on 64-bit Vista, where it fails with "Access denied". Looking into the server's access log, I can see that ...
The XMLDoc tool for API documentation is explained here:
http://edn.embarcadero.com/article/32770
Are there any free or commercial tools which can be used to create documentation based on Delphi's XML doc format?
Is there a newer version of the 'getting started' documentation? This page refers to Delphi 2005 and third party tools, som...
I have a routine that returns the number of cursors or icons in a group but how do you know which cursors or icons are associated with a specific group and how can you get the index of each icon in the group.
Any help would be appreciated.
...
TObject.InstanceSize returns 8, yet TObject doesn't declare any data members. According to the implementation of TObject.ClassType, the first 4 bytes can be explained as a pointer to the object's TClass metadata. Anyone know what the other 4 bytes of overhead are there for?
EDIT: Apparently this is specific to D2009. In older versions...