delphi-2009

D2009 TStringlist ansistring

家住魔仙堡 提交于 2019-12-09 08:03:55
问题 The businesswise calm of the summer has started so I picked up the migration to D2009. I roughly determined for every subsystem of the program if they should remain ascii, or can be unicode, and started porting. It went pretty ok, all components were there in D2009 versions (some, like VSTView, slightly incompatible though) but I now have run into a problem, in some part that must remain ansistring, I extensively use TStringList, mostly as a basic map. Is there already something easy to

Comparing Time Values

霸气de小男生 提交于 2019-12-09 01:54:26
问题 I want a method which compares the times, eg if Atime occurs earlier than Btime do something, I would use a CompareTime Function but my problem with this function is what is said in "Bold Brackets" (see below) Call CompareTime to compare the two TDateTime values specified by A and B. CompareTime returns: LessThanValue if A occurs earlier in the day than B ( even if A occurs on a later day than B ). GreaterThanValue if A occurs later in the day than B (even if A occurs on an earlier day than B

How do I catch a VK_TAB key in my TEdit control and not let it lose the focus?

狂风中的少年 提交于 2019-12-09 01:00:04
问题 In my TEdit field I have text in the form <number1>..<number2> . My idea is: When a user enters the control using TAB from another control, number1 gets selected. When my TEdit control has a focus and user presses TAB again, I want the number2 to get selected and number1 to be deselected. And if current caret position is at the place where number2 is, pressing TAB should act normal and move the focus to the next control on the form. I have 2 problems. I cannot catch the tab key press when the

THttprio onBeforeExecute changing the soapRequest

你说的曾经没有我的故事 提交于 2019-12-09 00:53:19
问题 I've imported some wsdl for a project. i want to change the SoapRequest on HttpRio onBeforeExecute event, but as i changed the request, im getting some errors how can i change the request xml file with stringReplace function on this event. i've tried to change the size of stream, i ve changed the encoding etc. but anyway it didnt work. example procedure TForm1.RiomBeforeExecute(const MethodName: string; SOAPRequest: TStream); var sTmp : TStringList; begin sTmp:=TStringList.Create; SOAPRequest

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

橙三吉。 提交于 2019-12-08 21:59:12
问题 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. 回答1: The dcu files for Indy are stored separately from the other Delphi units. To stop using them, simply remove that directory from the search path, library path, etc., and remove the source files from the browse path. You can remove the design-time packages the same as

Delphi applications considered 'dangerous' by Google Chrome

南笙酒味 提交于 2019-12-08 14:52:34
问题 I often produce mathematical software in Delphi 2009, and publish it on my web site. However, the last year or so, Google Chrome has started to consider a small (but increasing!) number of my EXEs 'harmful', and Google Chrome refuses do download them. For example, today I wrote a program that visualises the Lorenz attractor. You can find it at https://specials.rejbrand.se/chaos/lorenz/; it's lorenz.exe. When I use Google Chrome to download this EXE, the following prompt appears: (Yeah, I

Is System.Pos in Delphi Flawed?

自古美人都是妖i 提交于 2019-12-08 14:09:28
问题 Problem If the text in TRichEdit is something like this; 'hello, world'#$D#$A Then the following routine displays TRUE. However when the RichEdit has 'test'#$D#$A#$D#$A'test'#$D#$A#$D#$A'test'#$D#$A Then the routine displays FALSE. It seems to me to be flawed as it is finding the comma's but not the newlines/linefeeds. I created a workaround to walk the string instead and find what I'm looking for but am still really curious why the Delphi function doesn't work. Any ideas? procedure TForm1

Which dbExpress ServerCharSet do I need for utf8 data in MySQL 5?

天大地大妈咪最大 提交于 2019-12-08 08:15:32
问题 We tried ServerCharSet=utf8 and ServerCharSet=UTF8 , based on information found in newsgroups - but still, special characters / Umlauts do not appear correctly in the client data. We use Delphi 2009 and the built-in dbExpress driver. Field data is retrieved using AsWideString. 回答1: you have to set up a client charset. Simple " SET NAMES utf8 " query, executed right after connect, will do the trick 来源: https://stackoverflow.com/questions/3598593/which-dbexpress-servercharset-do-i-need-for-utf8

How do I parse this XML string in Delphi 2009?

时光怂恿深爱的人放手 提交于 2019-12-08 03:45:26
问题 This is the information that the XML string has. <?xml version="1.0" encoding="UTF-8"?> <string xmlns="http://tempuri.org/"> <statusInfo><vendorClaimID>BRADY12478018AETNA</vendorClaimID> <statusID>0</statusID><statusDescription>Unvalidated</statusDescription> </statusInfo></string> But this is how it comes in.. You will have to scroll to the right to see all of it. '<?xml version="1.0" encoding="utf-8"?>'#$D#$A'<string xmlns="http://tempuri.org/"><statusInfo><vendorClaimID>BRADY12478018AETNA<

TMenuItem-Shortcuts overwrite Shortcuts from Controls (TMemo)

五迷三道 提交于 2019-12-08 03:28:27
问题 What can I do that shortcuts for menu items don't overwrite those from local controls? Imagine this simple app in the screenshot. It has one "undo" menu item with the shortcut CTRL+Z (Strg+Z in German) assigned to it. When I edit some text in the memo and press CTRL+Z I assume that the last input in the memo is reverted, but instead the menu item is executed. This is especially bad in this fictional application because the undo function will now delete my last added "Item 3" which properties