delphi-2010

Adding files to the DPR file vs project paths in Delphi 2010

浪尽此生 提交于 2019-11-27 04:42:47
问题 We are just migrating from D7 to D2010 and are having a debate about cleaning up the project paths. We have a number of directories with a large number of Pas files that are included on some project paths, but only a few of the files are actually used by any single project. One option is to eliminate the project paths completely and only have all used files in the dpr. The second option is to keep only the needed files in the dpr and have project paths to the directories for the rest of the

What is the fastest XML Parser available for Delphi?

早过忘川 提交于 2019-11-27 04:14:22
问题 We have reasonably large XML strings which we currently parse using MSXML2 I have just tried using MSXML6 hoping for a speed improvement and have got nothing! We currently create a lot of DOM Documents and I guess there may be some overhead in constantly interacting with the MSXML2/6 dll Does anyone know of a better/faster XML component for Delphi? If anyone can suggest an alternative, and it is faster, we would look to integrate it, but that would be a lot of work, so hopefully the structure

How do I work around Delphi's inability to accurately handle datetime manipulations?

北慕城南 提交于 2019-11-27 03:56:06
问题 I am new to Delphi (been programming in it for about 6 months now). So far, it's been an extremely frustrating experience, most of it coming from how bad Delphi is at handling dates and times. Maybe I think it's bad because I don't know how to use TDate and TTime properly, I don't know. Here is what is happening on me right now : // This shows 570, as expected ShowMessage(IntToStr(MinutesBetween(StrToTime('8:00'), StrToTime('17:30')))); // Here I would expect 630, but instead 629 is displayed

PostMessage returns “invalid window handle” in thread

Deadly 提交于 2019-11-27 03:31:43
问题 Background: I am using OmniThreadLibrary to load batch mode ADO stored procedures in the background. I am doing some slightly dodgy stuff by swapping the connection after opening the SP but that seems to be quite reliable. I'm using PostMessage to send messages back to the calling form and that works in my test applications. Primoz' comms channels work for me, I'm using those for inter-thread comms but for our main application I'm trying to avoid that dependency by using standard PostMessage

Getting size of a file in Delphi 2010 or later?

送分小仙女□ 提交于 2019-11-27 03:03:38
问题 Delphi 2010 has a nice set of new file access functions in IOUtils.pas (I especially like the UTC versions of the date-related functions). What I miss so far is something like TFile.GetSize (const Path : String) What is the Delphi 2010-way to get the size of a file? Do I have to go back and use FindFirst to access TSearchRec.FindData ? Thanks. 回答1: I'm not sure if there's a "Delphi 2010" way, but there is a Windows way that doesn't involve FindFirst and all that jazz. I threw together this

Practical usage for Delphi's new RTTI - Attributes,Values

对着背影说爱祢 提交于 2019-11-27 01:13:01
问题 I found a great explanation about the new RTTI in Delphi,but I don't understand one important thing about all I have read - Where can I use that? What is it supposed to replace? 回答1: The extended RTTI works like Reflection in .NET. It gives you access to your internal application structure information. You can access class properties, methods etc.. at runtime, at extent you could not do it before. Some ways of using it: Serialization / Deserialization of classes to XML or other media Mapping

Why should I care about RTTI in Delphi?

守給你的承諾、 提交于 2019-11-27 00:15:27
问题 I've heard a lot about the new/improved RTTI capabilities of Delphi 2010, but I must admit my ignorance...I don't understand it. I know every version of Delphi has supported RTTI...and I know that RTTI (Runtime Type Information) allows me to access type information while my application is running. But what exactly does that mean ? Is Delphi 2010's RTTI support the same thing as reflection in .NET? Could someone please explain why RTTI is useful? Pretend I'm your pointy haired boss and help me

FTP Over SSH (SFTP) In delphi 2010

僤鯓⒐⒋嵵緔 提交于 2019-11-26 22:17:29
问题 I'm writing a simple Delphi App to upload a few files to a SFTP Server. i thought i would be able to use a TIdFTP indy client but it seams as tho their is not an option for FTP Over SSH (SFTP) does anyone know of any Free / Open source Components for Delphi 2010 that would support FTP over SSH (SFTP). Due to security reasons im unable to use Active X controls so please do not respond with Active X solutions. Thanks for the help, Kyle 回答1: SFTP and "FTP over SSH" are two separate things, and

Multiple Delphi versions on the same machine

戏子无情 提交于 2019-11-26 21:32:29
问题 What we would like to do is install multiple Delphi versions on the same machine, those versions are D7, D2010 and DXE. We had previously D7 and D2010, worked OK together(had to duplicate components for D7 and D2010 because of special conditions for various versions), however, I'm not sure about XE, hence the question. Of course we could experiment, but that means wasting quite a few hours, so if someone already had made a similar setup or actively have, can you please share you experience?

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

*爱你&永不变心* 提交于 2019-11-26 21:24:58
This question already has an answer here: How to also prepare for 64-bits when migrating to Delphi 2010 and Unicode 4 answers Possible Duplicate: How to also prepare for 64-bits when migrating to Delphi 2010 and Unicode Since I believe that 64bit Delphi compiler will appear soon, I am curious if anybody knows what kind of programs that are now 32bit will compile and work without any changes when using 64bit compiler. And if there is a general rule what kind of changes should we systematically make in our old programs to be compiled as 64bit ? It is good to be prepared when the 64bit compiler