Re: [DUG]: Comms Problem
Title: Message Jeremy following thread from google usenet archive may be of interest (url is all one line between blank lines) http://groups.google.com/groups?hl=enlr=ie=UTF-8oe=utf-8threadm=Ls39balBCHA.1836%40tpsmail01.turbopower.netrnum=1prev=/groups%3Fq%3Dturbopower%2B%2522buffer%2Bis%2Bempty%2522%26sourceid%3Dopera%26num%3D0%26ie%3Dutf-8%26oe%3Dutf-8 -nshttp://www.roserox.co.th - Original Message - From: Jeremy Coulter To: Multiple recipients of list delphi Sent: Friday, September 05, 2003 03:29 Subject: [DUG]: Comms Problem HI all. We brought TurboPowers Async Pro, oh, while before they open sourced, so we dont have any support now. But I wondered if anyone else on the list has seen or had this problem. We have an app. that captures data from a comport. It works fine etc., but sometimes we see a "Buffer is Empty" messagebox. The application is still logging in the background, but the message box is a pain. IT only happens every now and then tho. I dont know which buffer its saying is empty. I can only assume it might be the Transmit buffer. We dont transmit any data, so its kinda weired. I have never seen the error during development, as you never do :-) I DID notice that the RTS property is set to TRUE, and I think this should be FALSE as it does not need to know its RTS. Anyone know if its as simple as just this? or is the problem somewhere else? p.s. I have done a GREP search and found that "Buffer is Empty" is part of the Async Pro code BTW ;-) Cheers, Jeremy Coulter All email scanned with Nortons Antivirus 2003
Re: TinyURL - was RE: Re: [DUG]: Comms Problem
Message You might like to check out www.tinyurl.com which is great for long URLS like this... touche ok - i deserved that g as partial redemption i will take your suggestion - here for all posterity (assuming tinyurl.com's claim that these never expire is true) is the tinyfied version ... http://tinyurl.com/mai5 -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Restoring Lost Connections
Title: Message Is it possible a DHCP assigned IP address lease is expiring and your server address changes while you are using it? I have no idea how well that gets handled - presumably you should (and probably do) have the SQL server assigned a static IP. maybe worth a look though ... -nshttp://www.roserox.co.th - Original Message - From: Jeremy Coulter To: Multiple recipients of list delphi Sent: Thursday, August 28, 2003 03:28 Subject: [DUG]: Restoring Lost Connections Hi All. As some of you may remember from late last week I put on a post about some issues that I thought were relasted to dodgy networking cable or a bit of dodgy hardware in out SQL server, and that progressed into Static arrays and all sorts. Ok, well, this has resolved some issues, BUT there is still a bit of dodgy hardware somewhere as sometime we will get lost connections still. SO, the user gets an error "Lost Conection" there something like that, and I have code that is MEANT to reconnect to the DB if it does diconnect, this is in an ADOConnection comp. but the code never seems to fire, and even if I try to trap the error using the ADOConnection comp, it still does not always trigger. BUT I should larify one thing. The forms are all static, and the error happens when the user tries to update or insert the data. The events are, press button, build SQL string, fire the queryits at this point that the user gets notified of the lost connection. I of course get panicy phone calls from users who dont want to loose their data etc. etc. etc. This sometimes only happens once a week, sometimes 2, depending on whats going on. Anyone got some suggestions? Cheers, Jeremy Coulter All email scanned with Nortons Antivirus 2003
Re: [DUG]: InternetOpenURL
take a look at InternetSetOption()INTERNET_OPTION_CONNECT_TIMEOUT hope this helps -nshttp://www.roserox.co.th - Original Message - From: dave To: Multiple recipients of list delphi Sent: Tuesday, August 26, 2003 07:04 Subject: RE: [DUG]: InternetOpenURL Actually, the function did come back, just took about 15 minutes. Any help on this one? Dave -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of daveSent: Tuesday, 26 August 2003 11:46 a.m.To: Multiple recipients of list delphiSubject: [DUG]: InternetOpenURL Hi all, Using InternetOpenURL to return the text of a web page, any idea why this appears to hang permanently on a page, where the page opens fine in the browser? Always the same page which is a standard HTML page. All others I have tried work fine. Is there any way of specifying a timeout for this function? Cheers, Dave.
Re: [DUG]: Help - Dll all broke
I have done practically nothing with the dll prior to calling FreeLibrary, called the same function 2x which returns a string (sharemem is in the uses). A number of other DLLs for other clients all work perfectly. can you move just the required DLL source files to a clean D6 box and rebuild it? maybe you are inadvertently dragging in a stray D4 vcl or dcu file or component that's left over on the machine from when you were working in D4. (a vague guess ...) -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: rtl not found
Title: Message maybe the lib path settings are different on the box at home? -nshttp://www.roserox.co.th - Original Message - From: Jeremy Coulter To: Multiple recipients of list delphi Sent: Monday, August 11, 2003 05:00 Subject: [DUG]: rtl not found HI all. I have taken a DPK from home to work, and when I try to compile the DPK, I get, "Required Package 'rtl' not found" They are bot running hte same update pack, and seem to be pointing to the same location for the rtl.dcp. anyone know? Cheers, Jeremy Coulter All email scanned with Nortons Antivirus 2003
Re: [DUG]: Coding music?
here kind of a Beatles fan - (remember them?) they have such a complete playlist there's a song for every situation: "Come Together"(compiling) "I'll Get You"(debugging) "Not A Second Time" (reproducing a customer bug report)"You Won't See Me" (popping up XP modal dialogs)"It Won't Be Long" (debugging legacy 16-bit integer computations)"You Know My Name - Look Up the Number" (porting legacy DBISAM apps)"A Beginning" "The End" (porting from C to Pascal)"When I'm Sixty Four" (porting to Whistler) "Octopus's Garden" (network cabling) "Misery" (attempting OOP in visual basic) "Love Me Do" (nested loops) "I'll Be Back" (nested procedure calls) "I'm Only Sleeping" (thread synchronisation) "Fixing A Hole"(installing MS security patches)"I Should Have Known Better" (upgrading Windows) "I'm Down"(after upgrading Windows) "Help"(searching the KB) "With A Little Help From My Friends" (readingthe DUG list) -nshttp://www.roserox.co.th
Re: [DUG]: SQL foolishness
Rohit in the form without the loj, presumably you want the result set to be rows from cln matched with rows from the return of Get_Address where the Ref_Numbers match.(right?) So why isn't the query like this: select count (cln.Ref_Number) from Client_Main cln , Get_Address ('PST','C',cln.Ref_Number) adr where cln.Status = 'A' and cln.Ref_Number = adr.Ref_Number order by cln.First_Name (i'm assuming Get_Address returns a row with a column for Ref_Number) I rarely use this method of combining rows (i use joins) but when i do the where always links them in the same way a join would. does this make any sense? -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Adding Calculated Field
if you aren't using persistent fields then ISTR you can't define calculated fields. is it possible to pre-define a few of these calculated checkboxes (all handled by the same handler) and alter their grid visibility on the fly instead of creating them? (i don't completely understand your problem so this may be a miss) -ns http://www.roserox.co.th - Original Message - From: Rohit Gupta [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, June 13, 2003 04:36 Subject: Re: [DUG]: Adding Calculated Field Any other suggestions.. I am really stuck here... PROBLEM The only solution I have is to use a calculated field at run-time. I cant define persistent fields as the query changes depending on user input. The list from the qry gets displayed and the user needs to deselect some rows. If I have a calculated field linked to a checkbox - then when he presses space or dbl- clicks on that column, I can fire a separate qry to record this in an exclusion table and because its a calculated field I can refresh the display to give him immediate feedback. if the exclusion table was joined to the query then I would have to refresh the query which can take several minutes I would not be able to provide immediate feedback. The only other soultion would have been multiple inserts from an sql statement - but that is not supported. Then I could have populated an inclusion table instead. How do I go about adding a calculated field to a dataset/grid at run-time ? I have tried various things - none of them work fielddefs.add fielddefs.addfielddef fields.add Regards Rohit Regards Rohit = = CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] = = -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: TI docs
they're here: http://search.borland.com/ http://community.borland.com/article/0,1410,15707,00.html this one is possibly relevant to your field creating question. -ns http://www.roserox.co.th - Original Message - From: Rohit Gupta [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, June 13, 2003 06:26 Subject: [DUG]: TI docs where do I get the TI docs from ? Cant seem to find any link on Borlands website Regards Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Application Specific Cursors
Put your cursor is in a win32 RES file called RES32.RES (where RES32 is NOT the name of your project file) and add this line: {$R RES32.RES} to the .dpr file (after the uses) -ns http://www.roserox.co.th - Original Message - From: David O'Brien [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, June 12, 2003 07:14 Subject: [DUG]: Application Specific Cursors I have created a cursor in an application resource file using the Image Editor, as per the help. const crMyCursor = 5 ; Screen.Cursors[crMyCursor] := LoadCursor(HInstance, 'SIGHTCURSOR'); But this always returns 0. Any ideas why this doesn't work? Cheers, Dave. Sorry I have no comments to make about AV. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: Re: [DUG]: Application Specific Cursors
it's been like this for ages - maybe even since the original 16bit version. ISTR thinking that the IDE completely regenerates the application resource file on the fly during a build (so you can't have anything in there except form resources and the application icon) - but i'm not sure why i came to suspect this. (in other words - no, have no idea :) ) -ns http://www.roserox.co.th - Original Message - From: David O'Brien [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, June 12, 2003 08:13 Subject: RE: Re: [DUG]: Application Specific Cursors Any idea why you can't use the application resource file? Dave. -Original Message- From: Nello Sestini [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 June 2003 12:50 p.m. To: Multiple recipients of list delphi Subject: Re: [DUG]: Application Specific Cursors Put your cursor is in a win32 RES file called RES32.RES (where RES32 is NOT the name of your project file) and add this line: {$R RES32.RES} to the .dpr file (after the uses) -ns http://www.roserox.co.th - Original Message - From: David O'Brien [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, June 12, 2003 07:14 Subject: [DUG]: Application Specific Cursors I have created a cursor in an application resource file using the Image Editor, as per the help. const crMyCursor = 5 ; Screen.Cursors[crMyCursor] := LoadCursor(HInstance, 'SIGHTCURSOR'); But this always returns 0. Any ideas why this doesn't work? Cheers, Dave. Sorry I have no comments to make about AV. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: Re: [DUG]: Virus Alert: Someone has a BugBear...
The IPAs in the msg I received are under authority of LACNIC (registry for Latin America) According to LACNIC they're assigned to Telefonos del Noroeste S.A. de C.V. this is evidently an ISP in Mexico. (Telnor). Note that these are not spoofed headers - this is the IPA my SMTP server logged as the upstream connection. AFAIK Moisis Lspez [EMAIL PROTECTED] is the only poster on the list that uses this ISP I'd guess he's the virus victim and the worm spread to other list members from his PC -ns http://www.roserox.co.th - Original Message - From: Conor Boyd [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 08:51 Subject: RE: Re: [DUG]: Virus Alert: Someone has a BugBear... IIRC the virus can pick a random person from one's mailbox and use that as the Sender information, so it may well not be you that originated the virus, but somebody else on the list... ;-) Cheers, C. -Original Message- From: Jason Coley [mailto:[EMAIL PROTECTED] I have checked my PC, home and work and neither has the virus? I also checked the Nortons site and read the info on the virus and checked the registry entries also, so I don't think I have it. -Original Message- From: Tracey Maule [mailto:[EMAIL PROTECTED] I received it at home BEFORE it was announced... lucky I delete all suspect mails cause my antivir didnt pick it up - Original Message - From: Myles Penlington [EMAIL PROTECTED] Yep they sure do. Bubear-B has it's own SMTP server built in according to our admins - amoung other things, it's also polymorhic. We had the first Bugbear-B email appear 4 hours after it's discovery was announced - last thursday morning. Myles. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: Re: [DUG]: Virus Alert: Someone has a BugBear...
It's possible it's not you - there could easily be other subscribers using Telnor that never post so i didn't find them in my search (but they would also have our email addresses). In any case even if it did come from your PC you're a victim not at fault at some way - i hope it didn't sound like i meant you were. Sorry for the way my text editor mangled your name some strange effect of cutting and pasting those accented characters ... -ns http://www.roserox.co.th - Original Message - From: Moisis Lspez [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 09:41 Subject: Re: Re: [DUG]: Virus Alert: Someone has a BugBear... hey i think thats me :( (not good i guess) well i scanned several times and i had an infected attachment from a mail i never opened a few days ago anyways i'll keep checking and yep, im probably the only one with that isp on the list. sorry for the troubles moises -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Quick Reports Preview
(can't resist joining the guessing game ... ) try Release instead of Free (if that doesn't work i will dig up some working QR code) -ns http://www.roserox.co.th - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 09:35 Subject: RE: [DUG]: Quick Reports Preview Hi James Same result - AV Mark On 10 Jun 2003 at 14:25, James Sugrue wrote: What happens if you take the close out of the after preview event ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Howard Sent: Tuesday, 10 June 2003 2:04 pm To: Multiple recipients of list delphi Subject: RE: [DUG]: Quick Reports Preview Hi Steve If I comment out the line that frees QR1 I still get an AV. :-( Mark On 10 Jun 2003 at 13:54, Stephen Barker wrote: Mark, you don't need to free the QR1 component - it is owned by the form and will get destroyed when the form destroys. regards, Steve -Original Message- From: Mark Howard [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2003 1:42 p.m. To: Multiple recipients of list delphi Subject: [DUG]: Quick Reports Preview Hi All I'm trying to give my users the ability to display (and print) previously run and saved Quick Reports (ie .QRP files). I must admit that (among other things) the structure of QuickReports has been a considerable mystery to me. I have managed to get a Preview screen loaded with a saved report and displayed. I can resize and navigate the pages of the report OK but when I close the Preview I get an AV. I'd appreciate some help. It must be something to do with not properly freeing something. Below is what I have done. I have created a PreviewFm form and placed a TQuickRep component (QR1) on this form. The AfterPreview event contains just a Close statement. In my app I have the following procedure: procedure HandleViewReportsClick; //mh 2003-06-10 begin MainForm.OpenDialog.Filter := 'Report Files, *.qrp|*.QRP'; MainForm.OpenDialog.Title := 'Select file to view'; MainForm.OpenDialog.InitialDir := ExtractFileDir(Application.ExeName); if MainForm.OpenDialog.Execute then try Application.CreateForm(TPreviewFm, PreviewFm); PreviewFm.QR1.Prepare; try PreviewFm.QR1.QRPrinter.Load(MainForm.OpenDialog.FileName); PreviewFm.QR1.QRPrinter.Preview; finally PreviewFm.QR1.Free; end; finally PreviewFm.free; end end; Any help greatly appreciated Mark -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.488 / Virus Database: 287 - Release Date: 5/06/2003 -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- -- --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.488 / Virus Database: 287 - Release Date: 5/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.488 / Virus Database: 287 - Release Date: 5/06/2003 -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Re: [DUG]: Control window is gone
try deleting the dsk files -ns http://www.roserox.co.th - Original Message - From: John [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday, June 09, 2003 10:56 Subject: [DUG]: Control window is gone Hi all, I started D5 this afternoon and my main top window, where the components and Delphi controls reside, doesn't show! It only shows the properties window and the form code windows. Any ideas how to get my controls window back? TIA John -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Path to Web Server
if you're inside a WebModule you could call GetModuleFileName() (or if not - you could set up a CGI to invoke the such a module and return the path) -nshttp://www.roserox.co.th - Original Message - From: James Sugrue To: Multiple recipients of list delphi Sent: Thursday, June 05, 2003 04:22 Subject: [DUG]: Path to Web Server Does anyone know if there is an API call or similar to get the path (Win32) of the webserver installed on a machine? ---Outgoing mail is certified Virus Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.483 / Virus Database: 279 - Release Date: 19/05/2003
Re: [DUG]: OffTopic Batch file question
Mark I believe the START command also is supported in W95 so if in your batch file you have START /w foo1.exe START /w foo2.exe foo2 will wait for foo1 to complete before starting i'm not 100% sure about this - but i think it's correct -ns http://www.roserox.co.th - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, May 30, 2003 05:59 Subject: RE: [DUG]: OffTopic Batch file question Stacey Thanks for that suggestion but it doesn't fix the problem. The interesting thing is that the batch file that I have written works perfectly on Win2K but not on Win95. It's very frustrating to try to track down, because the client site only run's it once a day so I can only try a new fix once a day. (Can't fix it on my machine coz it ain't broke) I've also tried a batch file that goes: Call NewPatch.exe Call SetAttrib.bat Call DirBackup.bat Same problem the calls to the batch files run before the NewPatch EXE has even opened. Mark On 28 May 2003 at 16:23, Stacey Verner wrote: I'm a little rusty here, but I think that Call runs another process and waits for it. e.g. Call NewPatch.exe. Stacey -Original Message- From: Mark Howard [mailto:[EMAIL PROTECTED] Sent: Wednesday, 28 May 2003 16:20 To: Multiple recipients of list delphi Subject: [DUG]: OffTopic Batch file question Hi All Sorry for posting this on the main group - but it seems OffTopic is not behaving. This is what I posted there a couple of days ago. Hi I have a batch file that goes something like: NewPatch.exe //this is a Windows GUI application ATTRIB +R D:\PSLogV2\DBData\*.* This works fine on my Win2K machine - in that it waits for NewPatch to complete before running the ATTRIB line. On a client's Win95 machine, however it doesn't wait for NewPatch.exe to complete (in fact the ATTRIB line runs before the GUI app has even opened its window). Has anyone encountered this problem before? and is there a work around? TIA Mark -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: OffTopic Batch file question
Steve actually i have a program like this too and was going to suggest it - but then i wondered ... how to get W95 to wait for the wait program? won't W95 just start the wait program and then immediately execute the next batch command (before the wait expires)? -ns http://www.roserox.co.th - Original Message - From: Stephen Barker [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, May 30, 2003 08:34 Subject: RE: [DUG]: OffTopic Batch file question Mark, in addition to the 'start wait' option others have mentioned, I have had on occasion to add a delay in a batch file while waiting for a file to be fully written/closed etc. I have a small wait.exe which takes a parameter of no. of seconds to wait - I can send it if you want. regards, Steve -Original Message- From: Mark Howard [mailto:[EMAIL PROTECTED] Sent: Friday, 30 May 2003 1:14 p.m. To: Multiple recipients of list delphi Subject: Re: [DUG]: OffTopic Batch file question Well! Thanks for all the replies: Paul - 1. re use of Pause. Yep, that would have been a last resort! Pedrocelli - the Patch builder is 3rd party with no source. Jeremy - 1 No. 2 I was sort of coming to the conclusion that I might have to do this. Paul and Nello (again!) This is interesting: Call NewPatch.exe waited properly on NT4 and Win2K but not on Win95 Start NewPatch.exe didn't wait on NT4 and Win2K not tested on Win95 Now Start /WAIT NewPatch.exe does wait on NT4 and Win2K so is certainly worth trying on the client's Win95. Thanks - I'll let you know how it goes next week. Mark On 30 May 2003 at 7:48, Nello Sestini wrote: Mark I believe the START command also is supported in W95 so if in your batch file you have START /w foo1.exe START /w foo2.exe foo2 will wait for foo1 to complete before starting i'm not 100% sure about this - but i think it's correct -ns http://www.roserox.co.th - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, May 30, 2003 05:59 Subject: RE: [DUG]: OffTopic Batch file question Stacey Thanks for that suggestion but it doesn't fix the problem. The interesting thing is that the batch file that I have written works perfectly on Win2K but not on Win95. It's very frustrating to try to track down, because the client site only run's it once a day so I can only try a new fix once a day. (Can't fix it on my machine coz it ain't broke) I've also tried a batch file that goes: Call NewPatch.exe Call SetAttrib.bat Call DirBackup.bat Same problem the calls to the batch files run before the NewPatch EXE has even opened. Mark On 28 May 2003 at 16:23, Stacey Verner wrote: I'm a little rusty here, but I think that Call runs another process and waits for it. e.g. Call NewPatch.exe. Stacey -Original Message- From: Mark Howard [mailto:[EMAIL PROTECTED] Sent: Wednesday, 28 May 2003 16:20 To: Multiple recipients of list delphi Subject: [DUG]: OffTopic Batch file question Hi All Sorry for posting this on the main group - but it seems OffTopic is not behaving. This is what I posted there a couple of days ago. Hi I have a batch file that goes something like: NewPatch.exe //this is a Windows GUI application ATTRIB +R D:\PSLogV2\DBData\*.* This works fine on my Win2K machine - in that it waits for NewPatch to complete before running the ATTRIB line. On a client's Win95 machine, however it doesn't wait for NewPatch.exe to complete (in fact the ATTRIB line runs before the GUI app has even opened its window). Has anyone encountered this problem before? and is there a work around? TIA Mark -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz
Re: [DUG]: OffTopic Batch file question
This being Friday, here's an answer to my own question ... if the exe being run by the .BAT file is a 16bit DOS exe then W95 will wait for it to finish before executing the next command in the .BAT file. if the exe being run is a 32 bit Win32 exe then w95 can (and does) start it and then continue executing the .BAT file (without waiting for the 32 bit exe to terminate) so ... if Steve's wait program is an old 16bit dosapp then this will in fact work as advertised. This also means that if you have some way to build your BAT steps as 16bit exe's (like an old Delphi 1 compiler) this problem would go away. (But why bother - you can just use the START command) Also ... Win95 did indeed support the START command (earlier i said i wasn't sure). You may want to test whether /w and /wait options are accepted by all the platforms you need to run this on - ISTR some difference (like /wait is required by some) but can't remember the details.(Suggest testing - help is notoriously wrong about this kind of thing). Thanks Mark for this nostalgic walk down memory lane ;-) -ns http://www.roserox.co.th - Original Message - From: Nello Sestini [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, May 30, 2003 08:46 Subject: Re: [DUG]: OffTopic Batch file question Steve actually i have a program like this too and was going to suggest it - but then i wondered ... how to get W95 to wait for the wait program? won't W95 just start the wait program and then immediately execute the next batch command (before the wait expires)? -ns http://www.roserox.co.th - Original Message - From: Stephen Barker [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, May 30, 2003 08:34 Subject: RE: [DUG]: OffTopic Batch file question Mark, in addition to the 'start wait' option others have mentioned, I have had on occasion to add a delay in a batch file while waiting for a file to be fully written/closed etc. I have a small wait.exe which takes a parameter of no. of seconds to wait - I can send it if you want. regards, Steve -Original Message- From: Mark Howard [mailto:[EMAIL PROTECTED] Sent: Friday, 30 May 2003 1:14 p.m. To: Multiple recipients of list delphi Subject: Re: [DUG]: OffTopic Batch file question Well! Thanks for all the replies: Paul - 1. re use of Pause. Yep, that would have been a last resort! Pedrocelli - the Patch builder is 3rd party with no source. Jeremy - 1 No. 2 I was sort of coming to the conclusion that I might have to do this. Paul and Nello (again!) This is interesting: Call NewPatch.exe waited properly on NT4 and Win2K but not on Win95 Start NewPatch.exe didn't wait on NT4 and Win2K not tested on Win95 Now Start /WAIT NewPatch.exe does wait on NT4 and Win2K so is certainly worth trying on the client's Win95. Thanks - I'll let you know how it goes next week. Mark On 30 May 2003 at 7:48, Nello Sestini wrote: Mark I believe the START command also is supported in W95 so if in your batch file you have START /w foo1.exe START /w foo2.exe foo2 will wait for foo1 to complete before starting i'm not 100% sure about this - but i think it's correct -ns http://www.roserox.co.th - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, May 30, 2003 05:59 Subject: RE: [DUG]: OffTopic Batch file question Stacey Thanks for that suggestion but it doesn't fix the problem. The interesting thing is that the batch file that I have written works perfectly on Win2K but not on Win95. It's very frustrating to try to track down, because the client site only run's it once a day so I can only try a new fix once a day. (Can't fix it on my machine coz it ain't broke) I've also tried a batch file that goes: Call NewPatch.exe Call SetAttrib.bat Call DirBackup.bat Same problem the calls to the batch files run before the NewPatch EXE has even opened. Mark On 28 May 2003 at 16:23, Stacey Verner wrote: I'm a little rusty here, but I think that Call runs another process and waits for it. e.g. Call NewPatch.exe. Stacey -Original Message- From: Mark Howard [mailto:[EMAIL PROTECTED] Sent: Wednesday, 28 May 2003 16:20 To: Multiple recipients of list delphi Subject: [DUG]: OffTopic Batch file question Hi All Sorry for posting this on the main group - but it seems OffTopic is not behaving. This is what I posted there a couple of days ago. Hi
Re: [DUG]: OffTopic - Registry
in W2K (et al) registry hives/keys can be "volatile". Volatile hives persistonly until you shutdown. if the values you describe are volatile that would explain what you observed -nshttp://www.roserox.co.th - Original Message - From: Paul Mckenzie To: Multiple recipients of list delphi Sent: Tuesday, May 27, 2003 10:22 Subject: [DUG]: OffTopic - Registry G'day, I e-mailed this 8:30 this morningandI haven't seen any sign of it, so I am assuming there is something wrong with the off-topic list... Has anyone ever heard of the situation where parts (not all) the registry is returned to default values after every reboot ? It doesn't matter what type of user (Administrator or ordinary User) they, and the programs they install, can add keys and values - but when the reboot they all disappear ! The PC is a new Dell-W2K. The promise me not login scripts or anything like that are run for login. Any ideas or help much appreciated. RegardsPaul McKenzieAnalyst ProgrammerSMSS Ltd.
Re: [DUG]: Windows quirks and inexperienced users
if i'm following this correctly, i think the problem is that the "fax sent... " dialog is modal - so it blocks allkeystroke/mouse input sent to the main window of the app. one way to get around this (if it's your app) is to make that dialog modeless - and then enforce the "modal" features that you want (for example not allowing the user to do anything else until they cancel the dialog). If the dialog is modeless - then taskbar clicks and attempts to click into the main application window will work as expected. -nshttp://www.roserox.co.th - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi Sent: Friday, March 28, 2003 09:32 Subject: [DUG]: Windows quirks and inexperienced users Hi all I have a mail merge app which has a button for sending off a letter as a fax to the client. It has a dialog which comes back at the end of the process, saying "Fax sent to fax queue". In some instances, inexperienced users (not familiar with Windows) have sidetracked off to e.g. read an email, and then clicked back on the task bar item for the letters program again. When they try to exit the program, and it doesn't respond, they use ctrl-alt-delete! But if they'd looked on the task bar, they would have found another entry, which was the "Fax sent to fax queue" dialog, still waiting for the "OK" to be clicked. How do I help them out? Is there a way to change the behaviour of Windows, so that when clicking on a parent form, if there is a child form / dialog still outstanding (not dealt with), then it re-focuses to this? I'm new to Windows programming, so this may be a silly or easy question. Also, is it easy to trap the ctrl-alt-delete event and give a controlled response to the users desire to kill my app? Any suggestions appreciated. TIA. Dave Jollie Tower NZ IT 09 368 4259
Re: [DUG]: db calculation
(db/20) P1 = P2 e i.e. P1 = P2*exp(db/20) not sure if this is what you are after (and hope i haven't made some stupid mistake) -nshttp://www.roserox.co.th - Original Message - From: "Ross Levis" [EMAIL PROTECTED] To: "Multiple recipients of list delphi" [EMAIL PROTECTED] Sent: Thursday, March 06, 2003 09:57 Subject: [DUG]: db calculation Here's a maths question for you. I've never been that good at maths, particularly logarithms Does anyone know the formula to alter an integer value by a particular db value. I'm working on an audio app and I need to alter the volume by a particular db setting. The volume can be anywhere in the range 0 (silent) to 65535 (maximum). I know that db = 20 log (P1/P2) though I've also seen the 20 at 10. How do I get P1 (or is it P2) to the left of the equation. Thanks, Ross Levis. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: db calculation
This formula doesn't seem to work. The 20 should be 10 as Neven pointed out but I believe a -3db reduction should take 65535 to 32767 but it's not close. Any ideas? i read your log to be natural log but after reading Neven's post I think it's probably base 10 logs so my exp() should be 10^ instead P1 = P2 * 10^(db/10) -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: sql help please
i was waiting a bit for a more sage response, but ... could someone help me with my query please? I have the following tables /* snip ... */ Some skills are required in more than one job. If this person has both those jobs and doesnt have that skill, then the query returns the skill for as many times as it is needed. What i really want, is for the skill itsself to be only returned once, with the earliest timeperiod. Is this possible in SQL or do i need to frig with code? (distinct isnt working with all my joins) i think the problem with the DISTINCT might not be "all the joins", but instead thatthat different time periodsmake rows with the same skill different so they both show up. in similar situations i've handled this in 2 different ways. 1) use GROUP BY on all the distinct columns with MIN() on the time period column. 2) write a SP (in IB or Oracle where SPs can return rowsets) or a Function (in MSSQL after 7.0) that does the select with ORDER BY on the time period , fetchs one (the first) row into the return arguments of the SP and then returns. neither very elegant i'm afraid, but maybe you will find it useful -nshttp://www.roserox.co.th
Re: [DUG]: Conversion from Interbase to SQL Server.
interbase lets you do select * from PRocedurename(params) where MS SQL does not. starting with SQL/2000 you can define functions that return tables. i think that gets around this more or less transparently. -nshttp://www.roserox.co.th
Re: [DUG]: [Q] Looking for suggestions....
sort them into a queue in ascending order by time pop next from the queue set a timer to expire at the time of the event you popped wait for the timer when the timer goes off, play the event repeat till the queue is empty something like this should work assuming you have a timer available with resolution finer than your event granularity -nshttp://www.roserox.co.th - Original Message - From: Donovan J. Edye To: Multiple recipients of list delphi Sent: Tuesday, February 04, 2003 08:29 Subject: [DUG]: [Q] Looking for suggestions G'Day,I have a list of "events". Eg:13:12:23.165 Event A13:12:25.215 Event B13:13:02.165 Event C13:13:05.471 Event DI need to "replay" these events with the same time interval. I was looking for some approaches to do this:Approach 1:- Read all events into a memory structure- Poll the structure every x mileseconds and process the events that need to be "done"This seems rather inelegant. Has someone got a better idea or two?TIA -- Donovan -- Donovan J. Edye [www.edye.wattle.id.au] Namadgi Systems [www.namsys.com.au] Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 TVisualBasic = Class(None); Heard just before the 'Big Bang': "...Uh Oh" -- GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer replacement. Also includes freeware delphi windows explorer components. --
Re: [DUG]: Class not registered
One of the benfits of being a simple person, with simple needs. Mark Everything should be made as simple as possible, but not simpler -Albert Einstein -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Application icon oddity
are both the large and small icon images defined in the icon file? ISTR this problem being caused by an icon file with only one of the two images defined. -ns http://www.roserox.co.th - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday, October 21, 2002 09:46 Subject: [DUG]: Application icon oddity Hi folks, A small bothersome thing which one of you may have nailed previously: One of our apps keeps losing its application (taskbar) icon, reverting to the Delphi default. Testing with the same result on two separate machines: we load the icon and it appears to load (looking in the res file with the image editor shows it as MainIcon). But when we build the app, it keeps using the Delphi default icon. We've tried deleting the res file (and everything but the dpr, dfm and pas files) but it just won't hang on to the new icon. (The same icon file is successfully used as one of the Form icons, so it isn't an issue with the .ico file as far as we can tell). cheers, peter === Peter Hyde, SPIS Ltd, Christchurch, New Zealand * TCompress/TCompLHA component sets for Delphi/Kylix/C++ * TurboNote+: http://TurboPress.com/tbnote.htm -- top-rated onscreen sticky notes * Web automation for online periodicals: http://TurboPress.com Find all the above and MORE at http://spis.co.nz -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: polymorphism problem
i thought the cold weather season should be over by now. (apologies - long day) -ns http://www.roserox.co.th - Original Message - From: Jeremy North [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, October 17, 2002 11:43 Subject: RE: [DUG]: polymorphism problem do you have blue balls in the editor gutter in the delphi source? Is the source\vcl folder in your library path? JED Why constructor of TMetafile.Create is not called instead only TObject.Create is called? if TMetafile.Create is called, why I put I breakpoint in the source code of Graphics.pas at the TMetafile.Create, Delphi dosn't stop there? or Press F7 at line NGraphic := GraphicClass.Create, Dephi won't go to TMetafile.Create. ? Surely, my Compiler - use Debug Dcus is on. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the [EMAIL PROTECTED] -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Strange RECORD behaviour
check out packed in the help i think by default BP/Delphi adds a slack byte after the FirstName to align things on even bytes. VB doesn't do this - you can turn off alignment using the packed keyword type People = packed Record // ... -ns http://www.roserox.co.th - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, October 18, 2002 04:08 Subject: [DUG]: Strange RECORD behaviour I have been playing around with writing a random file in VisualBasic which works OK, then thought I would use BP 7 to access this random file and so created a record which I thought would be identical. I was getting garbage with the Pascal program so... When I look at the size of each, the BASIC version is 45 bytes and the Pascal Version is 46 !!?? VB ... size is 45 Type People InUse as Boolean RecPos as Integer Tag as Integer Total as Integer ID as Integer FirstName as String * 15 LastName as String * 20 end Type Pascal ... size is 46 Person = Record InUse: Boolean; RecPos : Integer; Tag : Integer; Total : Integer; ID : Integer; FirstName : String[15]; LastName : String[20]; end; where is the problem? What is the solution? Laurie.. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: EOleSysError
check permissions on network shares (where databases and EXE/DLLs are) and run dcomcnfg and check DCOM permissions if your appserver exports events the client has to allow connections by the server as well -nshttp://www.roserox.co.th - Original Message - From: Paul Mckenzie To: Multiple recipients of list delphi Sent: Thursday, October 17, 2002 09:31 Subject: [DUG]: EOleSysError G'Day Has anyone had experience with EOleSysError. We have a 3-tier App and on 1, computer only, we are getting this error ... I have had this error a couple of times when installing - I forgot to register the AppServer ! But this isn't the case ... I have tried Unregistering Rebuilding Registering (making sureI refresh, import etc.the type library) All to no avail ... Any help much appreciated. RegardsPaul McKenzieAnalyst ProgrammerSMSS ltd.
Re: [DUG]: polymorphism problem
Title: Message I agree with Kyley - the code as written always calls the TMetafile.Create because ImgType is always forced := 1 (ignoring the value passed as a parameter to the procedure) If you remove the ImgType := 1; then TMetaFile.Create gets called if you pass 1 and TBitMap.Create gets called if you pass 2 -nshttp://www.roserox.co.th - Original Message - From: Kyley Harris To: Multiple recipients of list delphi Sent: Thursday, October 17, 2002 10:42 Subject: RE: [DUG]: polymorphism problem TMetafile.create should get called, and does if i test your code?? sorry can't help, but your example is functioning correctly -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Jianming Lin (ASL)Sent: Thursday, 17 October 2002 4:36 p.m.To: Multiple recipients of list delphiSubject: [DUG]: polymorphism problem G'Day,guys, procedure TryMetadata(ImgType : Integer);var NGraphic: TGraphic; GraphicClass: TGraphicClass;begin ImgType := 1; case ImgType of 1 : GraphicClass := TMetaFile; 2 : GraphicClass := TBitmap; end; NGraphic := GraphicClass.Create; end; Whyconstructor of TMetafile.Create is not called instead only TObject.Create is called? [Jianming Lin (ASL)] This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit www.marshalsoftware.com
Re: [DUG]: To CASE or not?
if by filetype you mean a 3 byte extension (like .pas or .txt) and you can constrain the character set (say to case-indifferent alpha, digits and a few special characters like '$' and ' ' and '_') then you have about 40^3 (about 65k) possible file types. you could comfortably hold an array of 65k byte codes for include/exclude/whatever and map each 3byte filetype directly to an integer index into this array. BTW you can use a similar trick to quickly generate the index into the table from the 3 byte filetype: construct 3 tables of 256 integers (1 for each possible character in each of the 3 positions 1,2,3 of the filetype) - then sum those integers to create the index into the 65k array. if you have a lot of filetypes this will be faster than doing searching lookups into a table of 65000 codes. -ns http://www.roserox.co.th - Original Message - From: Alistair George [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 15, 2002 07:02 Subject: [DUG]: To CASE or not? Hi all. I am writing a backup routine which includes or excludes bunches of files/folders. For example, during the backup process the compressor must be told which file types to exclude. My concern is that if this bunch of types is numerous that the processing/parsing could be quite resource intensive. Any suggestions to achieve this would be appreciated. My own feeling is to run with a dynamic CASE statement, but even this would seem to take a pretty big chunk of processing time given each file is parsed? Thanks, Alistair George+ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Whats going to be best thing to do?
i don't know much about Topspeed - but if they have anything like a trigger (and you can make a slight modification to the database) you could add an insert trigger to the interesting table and a small insertlog table (keyed on timestamp or something) - and then log interesting inserts to this insertlog your monitor process could read stuff out of this table FIFO and delete the entries after it does whatever you need to do to each record. doing it this way would guarantee you do things in the right order and also avoid needing to scan the whole monster table looking for changes or counting records. -ns http://www.roserox.co.th - Original Message - From: vss [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, October 11, 2002 05:11 Subject: [DUG]: Whats going to be best thing to do? Hi all. I have a client who has a Clarion databse (Topspeed dbs) and we have now brought the TopSpeed ODBC driver, and can access the files. What we are trying ot do is when some data goes into a specific table, it has to get that record, and do something with it. Whats going to be the best way to do this do you think? My thoughts have been:- (1). do a record count and when the count is diff. go and get the new record.BUT what if 3 entries have been added...how do you know 3 have been added? what about, you go to get the last record, but another 2 have been added since you did the r/countdont think this is an option (2). SOMEHOW monitor the table so that as stuff is added do something. (3). Get the people who wrote the app. to make a mod that writes the data to an identical table (structurally) and then r/count this. if its 0 then it loop the records. #3 seems to me the best...just costly. The other problem IS, that we are trying to makeit as quick as poss. as the data is being posted onto a webpage, and at the moment usething the method we are using not, its about 1-2 mins before the new appears. Anyone else got any other Ideas? Jeremy -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: detect browser
in JavaScript you can look at the Navigator.useragent property -ns http://www.roserox.co.th - Original Message - From: Tracey Maule [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 4 October 2002 08:37 Subject: Re: [DUG]: detect browser um... any way of doing it without using asp? I run my app on Apache and i dont think i can use asp. Maybe i need to use javascript... ?? - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, October 04, 2002 1:05 PM Subject: RE: [DUG]: detect browser This is what you want. The following is some asp script to show all the server/browser variables. The item you need is HTTP_USER_AGENT And you will get something back like this - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) Which tells you I am running MS Internet explorer 5.5. Myles. % @ LANGUAGE=JScript % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titleTest Posting/title /head body form action=Esessn3.asp method=post input type=text name=textBxinput type=submit /form /body /html TABLE TRTDBServer Variable/B/TDTDBValue/B/TD/TR % e = new Enumerator( Request.ServerVariables ); s = ; for (; !e.atEnd(); e.moveNext()) { x = e.item(); s += trtd+x+/tdtd+Request.ServerVariables( x )+/td/tr; if (x==ALL_HTTP) s += trtd+x+/tdtd+escape(Request.ServerVariables( x ))+/td/tr; } % %=s% /table -Original Message- From: Rose, Alan (MDF Rangiora) [mailto:[EMAIL PROTECTED]] Sent: Friday, 4 October 2002 12:57 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: detect browser This only relates to the Pocket PC but it may give you some clues as to where to start. http://mobileinternetguide.org/xhtml/ch01s23s33s39.xhtml -Original Message- From: Tracey Maule [SMTP:[EMAIL PROTECTED]] Sent: Friday, 4 October 2002 12:37 To: Multiple recipients of list delphi Subject: [DUG]: detect browser Hi guys I need to display different input forms for users hitting my cgi app from a handheld. does anyone here know anything about how to detect what browser is hitting an app ? Tracey Software Developer / Web Master Logis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] (025) 213-1065 DISCLAIMER: This electronic message together with any attachments is confidential. If you are not the intended recipient, do not copy, disclose or use the contents in any way. Please also advise us by return e-mail that you have received the message and then please destroy. Carter Holt Harvey is not responsible for any changes made to this message and / or any attachments after sending by Carter Holt Harvey. We use virus scanning software but exclude all liability for viruses or anything similar in this email or any attachment. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: detect browser
doh :P yes of course - that's what i get for not really paying close attention to the thread -ns http://www.roserox.co.th - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 4 October 2002 08:53 Subject: RE: [DUG]: detect browser You can, but that is client side Javascript or DHTML ... I think Tracy is after server side. You just need access to the HTTP_USER_AGENT variable provided by the browser ... Myles. -Original Message- From: Nello Sestini [mailto:[EMAIL PROTECTED]] Sent: Friday, 4 October 2002 1:49 p.m. To: Multiple recipients of list delphi Subject: Re: [DUG]: detect browser in JavaScript you can look at the Navigator.useragent property -ns http://www.roserox.co.th - Original Message - From: Tracey Maule [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 4 October 2002 08:37 Subject: Re: [DUG]: detect browser um... any way of doing it without using asp? I run my app on Apache and i dont think i can use asp. Maybe i need to use javascript... ?? - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, October 04, 2002 1:05 PM Subject: RE: [DUG]: detect browser This is what you want. The following is some asp script to show all the server/browser variables. The item you need is HTTP_USER_AGENT And you will get something back like this - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) Which tells you I am running MS Internet explorer 5.5. Myles. % @ LANGUAGE=JScript % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titleTest Posting/title /head body form action=Esessn3.asp method=post input type=text name=textBxinput type=submit /form /body /html TABLE TRTDBServer Variable/B/TDTDBValue/B/TD/TR % e = new Enumerator( Request.ServerVariables ); s = ; for (; !e.atEnd(); e.moveNext()) { x = e.item(); s += trtd+x+/tdtd+Request.ServerVariables( x )+/td/tr; if (x==ALL_HTTP) s += trtd+x+/tdtd+escape(Request.ServerVariables( x ))+/td/tr; } % %=s% /table -Original Message- From: Rose, Alan (MDF Rangiora) [mailto:[EMAIL PROTECTED]] Sent: Friday, 4 October 2002 12:57 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: detect browser This only relates to the Pocket PC but it may give you some clues as to where to start. http://mobileinternetguide.org/xhtml/ch01s23s33s39.xhtml -Original Message- From: Tracey Maule [SMTP:[EMAIL PROTECTED]] Sent: Friday, 4 October 2002 12:37 To: Multiple recipients of list delphi Subject: [DUG]: detect browser Hi guys I need to display different input forms for users hitting my cgi app from a handheld. does anyone here know anything about how to detect what browser is hitting an app ? Tracey Software Developer / Web Master Logis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] (025) 213-1065 DISCLAIMER: This electronic message together with any attachments is confidential. If you are not the intended recipient, do not copy, disclose or use the contents in any way. Please also advise us by return e-mail that you have received the message and then please destroy. Carter Holt Harvey is not responsible for any changes made to this message and / or any attachments after sending by Carter Holt Harvey. We use virus scanning software but exclude all liability for viruses or anything similar in this email or any attachment. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz
Re: [DUG]: Multi Line Label
i may be completely missing the point - but try putting the TMemo on a TPanel and disable the Panel -ns http://www.roserox.co.th - Original Message - From: Terry Johnson [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 4 October 2002 10:45 Subject: [DUG]: Multi Line Label I want to put some text on a form, such as with a TMemo, but I want it to behave like a TLabel with regard to mouse and cursor. If I turn enabled off, it behaves as I want it to, except the colour is wrong. This has got to be easy... Ta Terry -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Column Names
Title: Message Neven (not Nevan :) ) I still see it as a design limitation of TDataSet (or more precisely TField) since FieldNamedoesn't I don't think this has anything to do with TDataset The issue is what the result set column names are when columns in two joined tables have the same name. For example the following query in Interbase: select p.pat_id,a.pat_id from patient p join patient_alias a on (p.pat_id = a.pat_id) results in 2 columns "PAT_ID" and "PAT_ID1" There's no ambiguity here, but if you want more mnemonic names for the result columns you need to alias them in your select The "name" of the "field" (column) comes from the underlying DBMS not from TDataSet (I think this was Kyley's original point) Maybe I am missing YOUR original point g -nshttp://www.roserox.co.th a/ include a Table Qualifier or b/ defer to Origin for Uniqueness (my prefered solution) in fact the whole naming of TField betrays its origin as SQL Tables do not have fields Neven (not Nevan) - Original Message - From: Kyley Harris To: Multiple recipients of list delphi Sent: Wednesday, October 02, 2002 9:23 AM Subject: RE: [DUG]: Column Names Nevan, I wasn't implying that your SQL wasn't normal or correct. I was implying that the resulting renaming of the columns is perfectly normal also and has nothing at all to do with TDataset or Delphi, but the choice of naming on the database server being accessed. I Agree that it would be nice for the server to more appropriately name columns based on origin, but it is hardly a TDataset function unless they chose to incorporate a SQL processor client side to duplicate the server functionality of interpretation. regards Kyley -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Neven MacEwanSent: Wednesday, 2 October 2002 9:09 a.m.To: Multiple recipients of list delphiSubject: Re: [DUG]: Column Names Kyley No it isn't ''Select Store.StoreID, StoreCriteria.StoreID from Store JOIN StoreCriteria on Store.StoreID = StoreCriteria.StoreID" is perfectly valid SQL, It stems more from the TDataSets non SQL heritage, and yes I could alias the column names but that isn't the point since the column names are unique anyway Neven - Original Message - From: Kyley Harris To: Multiple recipients of list delphi Sent: Tuesday, October 01, 2002 5:44 PM Subject: RE: [DUG]: Column Names it is a standard SQL thing. "select Store.StoreID Store_StoreID, StoreCriteria.StoreID Crit_StoreID" naming them yourselfmight be more useful to you -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Neven MacEwanSent: Tuesday, 1 October 2002 1:42 p.m.To: Multiple recipients of list delphiSubject: [DUG]: Column Names Hi all TADOQuerygiven a query of "select Store.StoreID, StoreCriteria.StoreID from Store JOIN StoreCriteria on Store.StoreID = StoreCriteria.StoreID" ie 2 columns with the same 'name' but notwill cause a fieldname of 'StoreID' and StoreID_1 is there any way to determine which is which ie is 'StoreID' Store.StoreID or StoreCriteria.StoreID (without parsing the SQL) or is this an problem with TDataSet Regards NevenN.K. MacEwan B.E. EEPh 649 621 0001Fax 649 621 0400[EMAIL PROTECTED]
Re: [DUG]: There's probably a simple explanation, but ...
What I do is keep all modules under sub-folders in a folder called v1_0 then when I generate v1_1 I copy whole folder and rename it - but project config still sets open files to old folder. Is there a better way to do this? i think a better way is to keep all modules under subfolders in a folder called (say) v_next and then when you release a version copy the whole folder to a new folder v1_1 (or whatever the version number is). This way the project and desktops alwaya refer to files in the v_next folders. You can also set the access to all the files in the copied folders to readonly so that if you open them (to compare old with new or whatever) you don't get your hands crossed and start modifying the wrong copy. -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: So Long and thanks for all the Fish...
best of luck James (hope you survive the COBOL ok ;-) ) -ns http://www.roserox.co.th - Original Message - From: James Sugrue [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, 25 September 2002 04:11 Subject: [DUG]: So Long and thanks for all the Fish... Guys, Today being my last day, I thought I would sign off. A big thank you to all you guys on the list. You have been a great resource over the last couple of years, and I hope I have contributed in some small way too. I wish everyone here the best of luck, and hope Delphi continues to lead the field. I am moving back to the sunny climes of Timaru to take up a job as a COBOL programmer. Moving for personal reasons rather than career, if you were wondering ;-) -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: how to get date time
you should first ask her if she wants time in a memo box. assuming the answer is yes, something like: Memo1.Lines.Add(FormatDateTime(' , d , , hh:mm AM/PM', Now)); (g) -ns http://www.roserox.co.th - Original Message - From: brendon [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Sunday, 8 September 2002 07:27 Subject: [DUG]: how to get date time I am wanting to know how do i get the date time in a memo box ie memo1.lines.add(date,time); -- .. Brendon Toogood Mandrake 8.2 Feel The Power Of Open Source -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Finding the controls bound to a datasource
Title: Message i'm not sure this qualifies as "cleaner" - but something like... type TPeekTDataSource = class(TDataSource); // shameless hack procedure FindFoo( d:TDataSource; foo : TClass );var i:integer; lk:TDataLink;begin // find all the controls of class foo that have Datasource property //set to d for i := 0 to TPeekTDataSource(d).DataLinks.Count-1 do begin lk := TPeekTDataSource(d).DataLinks[i]; if not (lk is TFieldDataLink) then continue; if not (TFieldDataLink( lk ).Control is foo) then continue; // found one ShowMessage ( TFieldDataLink( lk ).Control.Name ); end;end; -nshttp://www.roserox.co.th - Original Message - From: Stacey Verner To: Multiple recipients of list delphi Sent: Thursday, 29 August 2002 11:01 Subject: [DUG]: Finding the controls bound to a datasource Is there any way of enumerating the edit controls bound to a particular datasource or dataset? I can go throughthe list of controls owned by the form and find those that have a datasource property set to the datasource I care about, but I would like a cleaner method. Stacey Stacey Verner Ph: +64-9-4154790Software Developer Fax: +64-9-4154791 DDI: +64-9-4154797CJN Technologies Ltd. Email: [EMAIL PROTECTED]PO Box 302-278, North Harbour, Auckland 1330, New Zealand12 Piermark Drive, North Harbour, Auckland, New ZealandVisit our website at http://www.cjntech.co.nz/
Re: [DUG]: Finding the controls bound to a datasource
Title: Message nice. that WOULD qualify as "cleaner" IMO. - Original Message - From: Myles Penlington To: Multiple recipients of list delphi Sent: Friday, 30 August 2002 03:49 Subject: RE: [DUG]: Finding the controls bound to a datasource You could also send a CM_DATALINK message to the control and if it returns a non zero value, then you have a TDatalink ... Very similar in instance to this. Myles. -Original Message-From: Nello Sestini [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 29, 2002 6:24 PMTo: Multiple recipients of list delphiSubject: Re: [DUG]: Finding the controls bound to a datasource i'm not sure this qualifies as "cleaner" - but something like... type TPeekTDataSource = class(TDataSource); // shameless hack procedure FindFoo( d:TDataSource; foo : TClass );var i:integer; lk:TDataLink;begin // find all the controls of class foo that have Datasource property //set to d for i := 0 to TPeekTDataSource(d).DataLinks.Count-1 do begin lk := TPeekTDataSource(d).DataLinks[i]; if not (lk is TFieldDataLink) then continue; if not (TFieldDataLink( lk ).Control is foo) then continue; // found one ShowMessage ( TFieldDataLink( lk ).Control.Name ); end;end; -nshttp://www.roserox.co.th - Original Message - From: Stacey Verner To: Multiple recipients of list delphi Sent: Thursday, 29 August 2002 11:01 Subject: [DUG]: Finding the controls bound to a datasource Is there any way of enumerating the edit controls bound to a particular datasource or dataset? I can go throughthe list of controls owned by the form and find those that have a datasource property set to the datasource I care about, but I would like a cleaner method. Stacey Stacey Verner Ph: +64-9-4154790Software Developer Fax: +64-9-4154791 DDI: +64-9-4154797CJN Technologies Ltd. Email: [EMAIL PROTECTED]PO Box 302-278, North Harbour, Auckland 1330, New Zealand12 Piermark Drive, North Harbour, Auckland, New ZealandVisit our website at http://www.cjntech.co.nz/
Re: [DUG]: ADO MSSQL7 ANSI_PADDING
you may be up against a design restriction. the following note is from the OLEDB provider notes in the MS SQL SDK: quote These restrictions exist if a linked server is defined using the OLE DB Provider for ODBC and accesses a SQL Server database: Tables cannot be referenced if they have one or more timestamp columns. Tables cannot be referenced if they have nullable char, varchar, nchar, nvarchar, binary, or varbinary columns and the ANSI_PADDING option was set OFF when the table was created. /quote rgds -ns - Original Message - From: Neven MacEwan To: Multiple recipients of list delphi Sent: Wednesday, 21 August 2002 12:24 Subject: [DUG]: ADO MSSQL7 ANSI_PADDING Hi all Slightly off topic but does anyone know how to set ANSI_PADDING OFF using ADOExpress (connecting via the OLEDB Driver) I've got it out of the tables but seem to still have trailing spaces coming back TIA Regards NevenN.K. MacEwan B.E. EEPh 649 621 0001Fax 649 621 0400[EMAIL PROTECTED]
Re: [DUG]: Nil TNotifyEvent
i think you can just pass it without a cast foo.Create( nil ); or am i missing something? -nshttp://www.roserox.co.th - Original Message - From: Neven MacEwan To: Multiple recipients of list delphi Sent: Thursday, 22 August 2002 12:03 Subject: [DUG]: Nil TNotifyEvent Hi I have a constructor which I pass a TNotifyEvent to, This works fine but how do I pass it a nil TNotifyEvent? nil is an invalid Typecast Any ideas Regards NevenN.K. MacEwan B.E. EEPh 649 621 0001Fax 649 621 0400[EMAIL PROTECTED]
Re: [DUG]: 64 bit ints
i think the reason is that on a platform that has native 64bit integer support you might want separate implementations (a guess) -ns http://www.roserox.co.th - Original Message - From: Trevor Jones [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday, 19 August 2002 07:29 Subject: Re: [DUG]: 64 bit ints Steve: surely if you have just the one function function IntToStr(Value: Int64): string; and it's not overloaded, then the compiler still won't complain. That's why I was wondering what I had missed Trevor - Original Message - From: Steve Peacocke [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Saturday, August 17, 2002 4:58 PM Subject: Re: [DUG]: 64 bit ints No, you are missing nothing. One converts and Int64, the other an Integer. Stops the compiler complaining that you are using the wrong variable type. Steve At 04:26 pm 17/08/02, you wrote: I use quite a lot of these in my code, and from time to time need to convert them to striings, so I use IntToStr in SysUtils. I've noticed that there are two versions (overloaded) in sysUtils: { IntToStr converts the given value to its decimal string representation. } function IntToStr(Value: Integer): string; overload; function IntToStr(Value: Int64): string; overload; and their implementation is function IntToStr(Value: Integer): string; begin FmtStr(Result, '%d', [Value]); end; function IntToStr(Value: Int64): string; begin FmtStr(Result, '%d', [Value]); end; Am I missing something here?, they seem to be identical. Confused Trevor --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: LockWindowUpdate
i've tried using LockWindowUpdate in situations where i had a few mutually dependent windows and was getting race-condition repainting when something changed in one of them. What i thought should work was LockWindowUpdate( True ); // make whatever change // let all the cascading side-effect events fire LockWindowUpdate( False); // force a refresh But (as you described) LockWindowUpdate has these wierd global effects on all the desktop windows not just yours. In my case it made the whole screen momentarily flash - really annoying. In both cases i've tried this i've ultimately fixed the problem some other way - like using control flags in Paint functions to suspend redrawing while things are unstable. YMMV -ns http://www.roserox.co.th - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 16 August 2002 09:06 Subject: [DUG]: LockWindowUpdate Trying to use this at the moment. However when the window is locked any other item dragged on screen will leave a trail of images, when this occur the window that is supposedly locked can bee seen updating. Suggestions anyone? -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: LockWindowUpdate
i'm sure you're right i didn't mean that to be a code sample just a vague description of the process. Sorry if it looked like code. But - even though LockWindowHandle gets passed a window handle it appears to affect more than just that one window. In my case when repainting was restored the whole desktop flashed (as if all the windows repainted). -ns http://www.roserox.co.th - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 16 August 2002 09:22 Subject: RE: [DUG]: LockWindowUpdate From memory LockWindowUpdate( ) takes as a parameter the window handle of the window you want to lock, you then unlock with LockWindowUpdate( 0 ); -Original Message- From: Nello Sestini [mailto:[EMAIL PROTECTED]] Sent: Friday, 16 August 2002 2:21 p.m. To: Multiple recipients of list delphi Subject: Re: [DUG]: LockWindowUpdate i've tried using LockWindowUpdate in situations where i had a few mutually dependent windows and was getting race-condition repainting when something changed in one of them. What i thought should work was LockWindowUpdate( True ); // make whatever change // let all the cascading side-effect events fire LockWindowUpdate( False); // force a refresh But (as you described) LockWindowUpdate has these wierd global effects on all the desktop windows not just yours. In my case it made the whole screen momentarily flash - really annoying. In both cases i've tried this i've ultimately fixed the problem some other way - like using control flags in Paint functions to suspend redrawing while things are unstable. YMMV -ns http://www.roserox.co.th - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 16 August 2002 09:06 Subject: [DUG]: LockWindowUpdate Trying to use this at the moment. However when the window is locked any other item dragged on screen will leave a trail of images, when this occur the window that is supposedly locked can bee seen updating. Suggestions anyone? -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: LockWindowUpdate
I could be remembering this wrong - but ISTR that even passing a handle to a particular window cause side effects elsewhere. I'm sure I wasn't locking the desktop (well ... pretty sure g ) -ns http://www.roserox.co.th - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 16 August 2002 10:38 Subject: RE: [DUG]: LockWindowUpdate Yep, If you pass it handle 0, then it locks the desktop, so everything gets locked ... Myles. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: LockWindowUpdate
Not so long ago - if i remember correctly it was reproducible on NT4 W2K SP1 and some 9x version (98? ME?) of the person who reported the problem. and at that point I removed the LockWindowUpdate stuff and solved the problem some other way. It's possible there was something more complicated going on (this thing involved a TPageControl descendant and the other case was a TDBCtrlGrid descendant.) just read Guy's post about the error return I'll see if I can dig up the code and have another look at it. Maybe it was a case of this error Guy mentioned. -ns http://www.roserox.co.th - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 16 August 2002 10:55 Subject: RE: [DUG]: LockWindowUpdate Or how many M$ service packs ago did you have the problem and on which platform? -Original Message- From: Nello Sestini [mailto:[EMAIL PROTECTED]] Sent: Friday, 16 August 2002 3:53 p.m. To: Multiple recipients of list delphi Subject: Re: [DUG]: LockWindowUpdate I could be remembering this wrong - but ISTR that even passing a handle to a particular window cause side effects elsewhere. I'm sure I wasn't locking the desktop (well ... pretty sure g ) -ns http://www.roserox.co.th - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, 16 August 2002 10:38 Subject: RE: [DUG]: LockWindowUpdate Yep, If you pass it handle 0, then it locks the desktop, so everything gets locked ... Myles. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: More thread questions
except if you're required to use blocked socket i/o you'll be stuck in a socket call and can't call WaitForAnything() if non-blocking socket i/o is an option i agree this is the way. (you may need to use MsgWaitForMultipleObjects() instead though because it allows notification via alert of completed i/o. But the idea is the same -ns http://www.roserox.co.th - Original Message - From: Trevor Jones [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, 13 August 2002 14:20 Subject: Re: [DUG]: More thread questions Check out the WaitForMultipleObjects windows API call. It works with an array of Waitable handles and you can specify a timeout. If the component you use doesn't provide you with any Waitable handles, you can easily create one of your own with the CreateEvent API call and get your component to indicate success by calling SetEvent on the same handle. If you need the ability to provide an abort mechanism before the timeout has been reached, you can create another event and set that in VCL code without having to worry about synchronization issues. eg: AbortEvent := CreateEvent(nil,true,false,nil); SuccessEvent := CreateEvent(nil,true,false,nil); procedure TMyForm.btnAbortClick(sender : TObject); begin SetEvent(AbortEvent); end procedure TMyForm.SMTPComplete(Sender : TObject); begin SetEvent(SuccessEvent); end procedure TMyThread.Execute; var WaitHandles : array[0..1] of THandle; begin WaitHandles[0] := SuccessEvent; WaitHandles[1] := AbortEvent; ReturnValue := WaitForMultipleObjects(2,@WaitHandles,false,MyTimeout); if ReturnValue = WAIT_TIMEOUT then // timeout else if ReturnValue = WAIT_OBJECT_0 then // SuccessEvent Handle was set else // AbortEvent Handle was set end; HTH Trevor - Original Message - From: Robert Martin [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, August 13, 2002 3:46 PM Subject: [DUG]: More thread questions The SMTP component I use to email from within a thread recommends using the 'Blocking' transmission method for sending if used from within threads to reduce resource usage. The downsize is that transmission timeouts are no longer handled (effectively freezing a particular thread). The component help suggests writing my own code to handle timeouts but I'm not sure exactly how to do this, ant suggestions would be appreciated? Rob Software engineer Wild Software Ltd Ph 03 338-1407 -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: How do I create a passive listner in Delphi?
What's the term for this and any comments to get me started - e.g. where to look on the Net? FindFirstChangeNotification -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Search
i usually use grep for this. also the text editor i use in windows (UEdit) hasthis kind of regex search. One thing to watch out for is that some of your DFM's haven't drifted out of "text" format. This seems to happen sometimes for no apparent reason (and can interfere with this kind of search). -nshttp://www.roserox.co.th - Original Message - From: Paul McKenzie To: Multiple recipients of list delphi Sent: Wednesday, 14 August 2002 08:04 Subject: [DUG]: Search Has anyone else had problems (hopefully found a solution) with the search Find in Folders when looking for Text in DFM's ? I have tried searching for DataSource names in DFM's but Delphi (D6) tells me it can't find any... All my DFM's are Text. I have specified Drive\Directory\*.* I have tried Drive\Directory\*.DFM I even tried specifying the filename C:\MyDir\MyFile.DFM - this reported "System Error: Code 2" could not find the specified file. - I get this error weather or not I am viewing the file in Delphi Anyone else found this - I need a way to quickly/easily find,by name,where DataSources are used. TIA RegardsPaul McKenzieAnalyst ProgrammerSMSS Ltd.
Re: [DUG]: Palladium - a concern for developers?
Take the current registration process as an example. My prediction is that once enough firms have registered for the next 2 years, Microsoft will indeed come out with a new office version that will read older versions but not write to that format. This means that if you stuck with an older version of say, Word, then you will be unable to read all those word documents that people keep sending you and wanting you to read. This makes it a requirement to upgrade at any cost. Especially if Microsoft makes it slightly annoying to load and read older versions even if they do have the latest, as it will cause peer pressure for smaller players to pay whatever is required to upgrade - and I suspect at that stage it will require a full purchase. I am no defender of microsoft. but how is this any different than a company that starts making audio CD players that don't play vinyl LP discs? Or a company that stops making VCR players and replaces them with DVD players?. Are you under peer pressure to replace your old VCR so you can look at the latest DVDs? Would you expect companies to manufacture DVD players that continue to play VCR tapes forever? As I say - i hate to get into the MS corner on this, but MS has a pretty good record of actually going the extra mile to keep things compatible 2 or 3 versions back (16 bit code for example, MS Office formats) and usually gives plenty of warning about deprecated features, and clear (well sort of clear) directions for developers. I agree some cautious attention is warranted - but really palladium is just an extension of the idea of signed applettes and downloaded executable code. The important thing is that they give transparent control the the system administrator and not bury it in some obscure rat's nest of registry keys so the whole system locks up if something goes wrong. fwiw -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Palladium - a concern for developers?
But the point I was trying to make is that everytime you change your deisgn or release a new version of your electronic device you have to re-apply for the ISO standard and pay fees again to get the certification. ah - yes i see your point - fees. Yes this is just like that. Every time you change something you have to reapply (and pay). and yes that is a killer for us small developers. I wonder what this means for custom software? If we develop an application for a single customer and they want to run it on a palladium secure box do we have to recertify every time we fix a bug? (Sounds like a good argument for breaking things into servlettes). Can the components be certified separately? (Time for me to RTFM on this i see). this is where the level of control the sysadmin will have really matters. I do wish some group (like ISO) had come out with a competing standard ALREADY so MS didn't have the initiative on this one. -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Graphic in QR
Some things I would try (with only dim hope of success) 1. Setting the report units (i forget what this property is called) to pixels. I think by default it's mm or twips and this can result in some rounding anomalies. 2. with autosize false and stretch false try setting the dimensions slightly larger than the known size (in both dimensions). There are/were some known problems in QR with big bitmaps but it doesn't sound like your logo is pushing that envelope. Does reducing the size (e.g.. by reducing the colour density) affect the problem? happy pouncing -Ns http://www.roserox.co.th - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, August 09, 2002 6:04 AM Subject: Re: [DUG]: Graphic in QR Nope - no better. Should it make any difference whether I load a .GIF vs .BMP? As I said before, with the settings I have used it doesn't make any visible difference. Am I right in assuming that I SHOULD be able to get the same print definition from a TQRImage as I get from PhotoPaint? Any suggestions will be pounced upon. Mark On 9 Aug 2002 at 9:55, Robert Martin wrote: You should Set AutoSize to true and Stretch to False. The Stretch is most likely causing the fuzziness. An interesting Note my original reply was Set AutoSize to true and Stretch to False. The Stretch is most likely causing the fuzziness. but this gets rejected by the list server because it starts with Set. Rob Software engineer Wild Software Ltd Ph 03 338-1407 - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, August 09, 2002 8:41 AM Subject: [DUG]: Graphic in QR Hi from a graphics novice I have a company logo in a BMP file. When I print this out from Corel PhotoPaint, straight with no scaling or anything, it prints crisply with a size of about 30mm x 30mm. I then drop a TQRImage onto a QuickReport band and do LogoImage.Picture.Bitmap.LoadFromFile('Logo.bmp'); with Autosize set to true and Stretch set to True It tries to print it at about 120 x 120 mm If I then set Autosize to False and set the LogoImage height and width to 30mm It prints fuzzy - not half as clear as the same file printed from PhotoPaint. Does anyone have any experience that will help me with this? I have tried saving the image in GIF format, with the same results. TIA Mark -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: ClassNotFound Exception for no apparent reason
open up the DFM files (as text files if they're not already) and look for a phantom TPageControl. sometimes in design mode components get accidently dropped by a stray mouse click. one of the joys of visual design environments. -ns http://www.roserox.co.th - Original Message - From: David Smith [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, August 02, 2002 12:00 PM Subject: [DUG]: ClassNotFound Exception for no apparent reason Hi all, Has anyone had a EClassNotFound with message TPageControl not found. I have deleted the DCU's, done a build all but this hasn't fixed it. Any suggestions? David. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: UNC Path Names
Sorry Paul I don't know the answer, but assume that you will probably have to iterate through the drives and look for a match for matching UNC name. right. you use WNetOpenEnum to set up an enum of RESOURCETYPE_DISK resources. then call WNetEnumResource to get them. You get back a NETRESOURCE structure for each resource. NETRESOURCE has the localname and remotename so you can search through these pairs to find one matching your UNC path. Note that it's possible to have more than one drive mapped to the same UNC path so this mapping isn't well defined (the drive letter mapped to \\mybox\myshare needn't be unique. BTW the inverse mapping is much more straightforward - just use WNetGetConnection. WNetGetConnection maps local names (i.e. mapped drive letters) to the UNC name of their corresponding network share. This is unique (the UNC name associated with a mapped drive letter is well defined) so somewhat less trouble. -ns http://www.roserox.co.th The ExtractFileDrive is meant to extract the drive letter from a file name eg. D:\MyDir\Stuff.txt - D:\ \\MyServer\MyDir\Stuff.txt - \\MyServer\MyDir Regards, John -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: Re[3]: [DUG]: UNC Path Names
Is anyone else getting mail back, after posting to the list, saying that they have .exe attachments removed or the mail had a virus ??? i'm not.David Brennan did post something earlier about a message with an attached virus - this may be related. Also, I notice that reply posts from you attach the thing to which you are replying as an .eml file - this might be triggering some kind of scan the listserver is performing on posts it relays. -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Viruses in attachments
Is in not possible to block all attachments sent to this list? Surely it would be better to send any files that need to be swapped peer-to-peer anyway... it is possible (and has been discussed here a few times). i agree with you it's worth doing. but in this latest case, the worm coming from Rodelio gets sent directly from Rodelio to addresses of people who post to the list. (It isn't coming via the listserver). So it wouldn't have helped. -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Service Order
you do it by creating a dependency on the service(s) that you want to load before it. it's set up in a registry key: HKKM\SYSTEM\CurrentControlSet\Services\MyService\DependOnService read about the details here: http://support.microsoft.com/support/kb/articles/Q193/8/88.ASP -ns http://www.roserox.co.th - Original Message - From: vss [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, November 15, 2001 9:40 AM Subject: [DUG]: Service Order Hi all. Does anyone know how to change a service loading order ? i.e. I have written an app. thats a service, but it loads to early. anyone know ?? Thanks, Jeremy -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Best practice - To except or not
This is better if Assigned (Datasource.DataSet.Connection) then Result := Datasource.DataSet.Connection; if Datasource.Dataset is nil won't this raise an exception? -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: Re:[DUG]: Painting to HWND....
If your COM object handles all the drawing i'd be tempted to wrap it with a TWinControl (or at least derive the wrapper from that). TWinControl has the windows handle and message processing, but none of the TCanvas or painting stuff. Devil is in the details though ... -ns http://www.roserox.co.th - Original Message - From: Donovan J. Edye [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 4:20 AM Subject: Re:[DUG]: Painting to HWND P, Does the C++ COM Object do painting properly normally ??? Not sure what you mean by this, but the COM object is using DirectX internally and just uses the HWND as a mechanism to draw into the panel. Windows is getting time to process messages as other controls on the form are responsive. have you looked at LockWindowUpdate ? No. Good point. I will. Are you passing the Window Handle for the Form or the Panel ? For the panel. At 08:18 01/11/2001 +1200, you wrote: Does the C++ COM Object do painting properly normally ??? have you looked at LockWindowUpdate ? Are you passing the Window Handle for the Form or the Panel ? Regards Paul McKenzie = Paul McKenzie Jetbet II Developer = [EMAIL PROTECTED] Ph: (04) 576-6822 T.A.B. National Office 106-110 Jackson Street Petone New Zealand Reply Separator Subject: [DUG]: Painting to HWND Author: [EMAIL PROTECTED] Date: 31/10/2001 16:23 G'Day, We are developing a Delphi Front End to a C++ COM object. The COM object needs a HWND to draw some output. As an initial test we are using a TPanel for this. However the TPanel flickets badly as it tries to repaint itself. So the question is: What control needs to be used that has a HWND but that does not flicker withing the Delphi App. As a side issue - The mouse is also not visible over the TPanel. -- Donovan -- Donovan J. Edye [www.edye.wattle.id.au] Namadgi Systems [www.namsys.com.au] Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 TVisualBasic = Class(None); Oh -- GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer replacement. Also includes freeware delphi windows explorer components. --(See attached file: att1.htm) (See attached file: att2.eml) -- Donovan -- Donovan J. Edye [www.edye.wattle.id.au] Namadgi Systems [www.namsys.com.au] Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 TVisualBasic = Class(None); Heard just before the 'Big Bang': ...Uh Oh -- GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer replacement. Also includes freeware delphi windows explorer components. -- --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Ofttopic - Turbo Pascal - Delphi console apps
Here's another conundrum If Delphi 1 is used to compile a TP project as a console app is that app able to run in a Dos window, or in Dos full stop, without Windows? if this question is equivalent to this question: Can Delphi 1 be used to create 16 bit DOS apps (apps that run in DOS mode)? Then I think the answer is yes. If you are asking something more complicated like: Is it possible for a D1 app that runs in a DOS box to not run in DOS mode full stop? Then I'm not sure. I think no but maybe there's some strange thing that references a VxD or something that won't work in DOS but will in a windows DOS box. Certainly the REVERSE (stuff that works in DOS mode that doesn't in a Win16 DOS box) can be a problem. Are you actually doing something to run in 16bit mode? ISTR having trouble even getting the D1 IDE to run right on NT (or maybe it was W2K - not sure). -ns http://www.roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: TNMSMTP
take a look at: settings | control panel | internet options | connections is never dial a connection selected here? if it is, try one of Dial whenever ... or Always dial ... and see if it affects the problem. -ns http://www.roserox.co.th - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 16, 2001 1:57 PM Subject: [DUG]: TNMSMTP I have a problem using the TNMSMTP component - under Win 95, 98, ME the component will automatically initiate a dialup if not currently connect to the internet; but under Win 2000 it will not initiate a dialup - returns null remote address, but will use the connection if it already exists. Anyone able to give me some pointers here - I know that Indy is frequently recommended, but that is not the answer I am looking for. Regards Steve Galyer --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: TNMSMTP
Steve This problem interests me because we do a lot of stuff with the RAS API. Do you have some small app that exhibits the failure (i.e. tries to complete a connection and the OS doesn't dial out)? Or better - does the smtpdem.pas fail this way? (the only one I have is the one that came with D5) If i've somehow missed that you solved this it already some way (other than by using your own dialer) please repost it. (Sometimes the list misbehaves.) tia -ns http://www.roserox.co.th - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 17, 2001 6:47 AM Subject: Re: [DUG]: TNMSMTP Hi Patrick Relies on the system to dial. Regards Steve Galyer - Original Message - From: Patrick Dunford [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 17, 2001 12:27 PM Subject: RE: [DUG]: TNMSMTP We assume that you are referring to the default action that occurs when an application requests Internet access. Such requests are handled by the default dialler or whatever. MS Outlook uses its own dialler and can override the settings for Internet Explorer or other applications. Does your application use a dialup component, or does it rely on the system to dial? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Steve Galyer Sent: Wednesday, 17 October 2001 08:35 To: Multiple recipients of list delphi Subject: Re: [DUG]: TNMSMTP Thanks Patrick Nello but unfortunately neither of your suggestions are true. I have tried this approach already, anyway Outlook Express does an automatic dialup every 30 minutes which would suggest that these settings are OK. The problem occurs on several machines that I have tested under Win 2000 (both Professional and Advanced Server), yet I run other software incorporating the same component on a few hundred other machines around the country without this kind of problem; however the existing version of the software does not run under MDAC 2.6 because of the ADO bug, so I have not exposed widely to Win 2000 before. Regards Steve Galyer - Original Message - From: Patrick Dunford [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 16, 2001 9:33 PM Subject: RE: [DUG]: TNMSMTP or set to Local Area Network instead -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nello Sestini Sent: Tuesday, 16 October 2001 20:37 To: Multiple recipients of list delphi Subject: Re: [DUG]: TNMSMTP take a look at: settings | control panel | internet options | connections is never dial a connection selected here? if it is, try one of Dial whenever ... or Always dial ... and see if it affects the problem. -ns http://www.roserox.co.th - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 16, 2001 1:57 PM Subject: [DUG]: TNMSMTP I have a problem using the TNMSMTP component - under Win 95, 98, ME the component will automatically initiate a dialup if not currently connect to the internet; but under Win 2000 it will not initiate a dialup - returns null remote address, but will use the connection if it already exists. Anyone able to give me some pointers here - I know that Indy is frequently recommended, but that is not the answer I am looking for. Regards Steve Galyer -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz
Re: [DUG]: TNMSMTP
Oh and one more thing ... As a further test of whether this problem is something in the SMTP component or something in the OS settings can you please try a finger or ping command at the NT command line of the failing Win2000 environment? Does it dial out, or also fail? As several others already pointed out OE (and other apps) often use their own dialers, but ping will just open a socket, so it will test the OS autoconnect. -ns http://www.roserox.co.th - Original Message - From: Nello Sestini [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 17, 2001 8:40 AM Subject: Re: [DUG]: TNMSMTP Steve This problem interests me because we do a lot of stuff with the RAS API. Do you have some small app that exhibits the failure (i.e. tries to complete a connection and the OS doesn't dial out)? Or better - does the smtpdem.pas fail this way? (the only one I have is the one that came with D5) If i've somehow missed that you solved this it already some way (other than by using your own dialer) please repost it. (Sometimes the list misbehaves.) tia -ns http://www.roserox.co.th - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 17, 2001 6:47 AM Subject: Re: [DUG]: TNMSMTP Hi Patrick Relies on the system to dial. Regards Steve Galyer - Original Message - From: Patrick Dunford [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 17, 2001 12:27 PM Subject: RE: [DUG]: TNMSMTP We assume that you are referring to the default action that occurs when an application requests Internet access. Such requests are handled by the default dialler or whatever. MS Outlook uses its own dialler and can override the settings for Internet Explorer or other applications. Does your application use a dialup component, or does it rely on the system to dial? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Steve Galyer Sent: Wednesday, 17 October 2001 08:35 To: Multiple recipients of list delphi Subject: Re: [DUG]: TNMSMTP Thanks Patrick Nello but unfortunately neither of your suggestions are true. I have tried this approach already, anyway Outlook Express does an automatic dialup every 30 minutes which would suggest that these settings are OK. The problem occurs on several machines that I have tested under Win 2000 (both Professional and Advanced Server), yet I run other software incorporating the same component on a few hundred other machines around the country without this kind of problem; however the existing version of the software does not run under MDAC 2.6 because of the ADO bug, so I have not exposed widely to Win 2000 before. Regards Steve Galyer - Original Message - From: Patrick Dunford [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 16, 2001 9:33 PM Subject: RE: [DUG]: TNMSMTP or set to Local Area Network instead -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nello Sestini Sent: Tuesday, 16 October 2001 20:37 To: Multiple recipients of list delphi Subject: Re: [DUG]: TNMSMTP take a look at: settings | control panel | internet options | connections is never dial a connection selected here? if it is, try one of Dial whenever ... or Always dial ... and see if it affects the problem. -ns http://www.roserox.co.th - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 16, 2001 1:57 PM Subject: [DUG]: TNMSMTP I have a problem using the TNMSMTP component - under Win 95, 98, ME the component will automatically initiate a dialup if not currently connect to the internet; but under Win 2000 it will not initiate a dialup - returns null remote address, but will use the connection if it already exists. Anyone able to give me some pointers here - I know that Indy is frequently recommended, but that is not the answer I am looking for. Regards Steve Galyer -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail
Re: [DUG]: Event Log interaction with Delphi
The problem I have is then getting the event log to pickup the correct message form the application. What I have tried is to create a StringTable in a resource file like below, but currently I have had no success and are still getting the default message. STRINGTABLE { 71006, My custom event message here } If anyone can shed some light on how to do this it would be greatly appreciated I've never done this in a Delphi App - but have using VC++ and that project does it (I hope you are sitting down) like this: as part of the application build, BEFORE the link or compile, it runs a utility called MC.EXE MC takes a text .MC file with messages (separated by blank lines) formatted like this: MessageID= SymbolicName=MC_REBOOTSENTRYSTARTED Language=English Reboot sentry thread started . and produces as output 3 files: (1) a C++ header file with defines like this: // // MessageId: MC_REBOOTSENTRYSTARTED // // MessageText: // // Reboot sentry thread started // #define MC_REBOOTSENTRYSTARTED 0x1009L (2) a binary .bin file (call it MSG1.bin). the program includes the .h file so it can reference the #defined message identifiers in calls to the EventLog API. (3) and a .rc file to include with the application resource script .rc file for the app with lines like these: LANGUAGE 0x9,0x1 1 11 MSG1.bin When the application .rc script is compiled, it will use the .bin file to create a type 11 binary resource which is what the NT message system expects to find when formatting messages. It is one of Microsofts more spectacular examples of making something that could be so simple absurdly complex. The one problem that i don't see a way around is what you use to compile the .mc file to create that binary resource.The MC utility I'm using is part of the Win32 SDK - maybe you can download it from the MS website - not sure. BTW - one word of caution - debugging this stuff is a pain because of DLL caching. hope this is useful -ns http://roserox.co.th --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Event Log interaction with Delphi
Ben There is some bit fiddling going on here - i have never looked at it too closely - after I got it working i'm almost afraid to. But - here are the first few lines of .h file that gets created. These comments document the extra bits that get or'd into the message IDs. I think this probably explains some of what you are asking about. (you can ignore the CAT stuff - it has to do with message categories that this app uses. -ns http://www.roserox.co.th #define CAT_BASIC 1 // // Values are 32 bit values layed out as follows: // // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 // +---+-+-+---+---+ // |Sev|C|R| Facility | Code| // +---+-+-+---+---+ // // where // // Sev - is the severity code // // 00 - Success // 01 - Informational // 10 - Warning // 11 - Error // // C - is the Customer code flag // // R - is a reserved bit // // Facility - is the facility code // // Code - is the facility's status code // // // Define the facility codes // // // Define the severity codes // // // MessageId: 0x0001L (No symbolic name defined) // // MessageText: // // IFRTS Basic // #define CAT_STARTUP 2 // // MessageId: 0x0002L (No symbolic name defined) // // MessageText: // // Shutdown // #define CAT_SHUTDOWN 3 // // MessageId: 0x0003L (No symbolic name defined) // // MessageText: // // Shutdown // #define CAT_CategoryCount 3 // CAT_BASIC messages // // MessageId: MC_SERVICE_STARTED // // MessageText: // // Service started // #define MC_SERVICE_STARTED 0x1000L [...] snip - Original Message - From: Vaughan, Benjamin Carl [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 16, 2001 8:12 AM Subject: RE: [DUG]: Event Log interaction with Delphi Thanks Nello Myles, I have used MC and created a .rc and .bin file which I have been able to successfully add to my Delphi project and compile it. I then have used a useful little application called Resource Hacker, and can confirm that the message table is now within the application. Unfortunately the application is still not logging correctly. On further examination with Resource Hacker on other applications that use the application log (Norton Antivirus and ASP.DLL) I noticed that the messages that I create come in as I specify them (i.e. specify 106 in the MC file, and it ends up as 106 in the application). All other applications seem to have unusual numbers in the application itself eg. 106, Test Message (%1!s!). (taken from my App) 1090453506, \n%1 1090453507, \n%1 (taken from the Norton Antivirus application.) (Norton AV responds to EventID's such as 7,14..etc which are no where to be seen in their message file) What I am wondering is if there is some constant that I need to add to my EventID's or anything else. Regards Ben -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Renaming Folders in Windows
error 32 is a sharing violation. the file is being accessed by another process. -ns - Original Message - From: David O'Brien [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday, October 15, 2001 9:53 AM Subject: RE: [DUG]: Renaming Folders in Windows MoveFile returns false, and Getlasterror returns 32. Any idea what that means? I have tried many combinations of backslashes (with/without). Dave. -Original Message- From: Manning, John [mailto:[EMAIL PROTECTED]] Sent: Monday, October 15, 2001 3:28 PM To: Multiple recipients of list delphi Subject: RE: [DUG]: Renaming Folders in Windows Try the API function MoveFile! HTH, John -Original Message- From: David O'Brien [mailto:[EMAIL PROTECTED]] Sent: Monday, 15 October 2001 12:27 pm To: Multiple recipients of list delphi Subject: RE: [DUG]: Renaming Folders in Windows Doesn't appear to work. Any other suggestions? Dave. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Array of labels in QR
function GetMyLabel(Index:Integer): TQRLabel; property MyLabels[Index: Integer]: TQRLabel read GetMyLabel; default; These two under Public Declarations? i'd make GetMyLabel Protected or Private and property Mylabels Public. Probably it doesn't much matter because you're not going to access the property from outside the form anyway. function GetMyLabel(Index:Integer):TQRLabel; begin // in production probably should do some error checking ... return FindComponent(format('mylabel_%d',[Index]); end; This under Implementation correct Should it be result := [...] oops - yes it should. (i've been writing C++ - i knew something would creep in). Should it be [...] MyLabels.FindComponent ...etc? no.FindComponent searches the component list by name. So you want to call the FindComponent method of the owner of your QRLabels. This is the TForm. I get error Undeclared identifier - MyLabels If I leave MyLabels out I get error Undeclared identifier - FindComponent. I can see how FindComponent would work - I'm just tripped up on the declaration details, I think. see above. I regret winging this - it's too confusing.Here is a revised version of the functions (that DO compile and even work) which should be a lot clearer. Also, I've posted the full .pas and .dfm files here http://roserox.co.th/dugnz/unit2.pas http://roserox.co.th/dugnz/unit2.dfm function TForm2.GetMyLabel(Index: Integer): TQRLabel; var ret:TQRLabel; begin // in production probably should do some error checking ... result:= FindComponent(format('qrlabel_%d',[Index])) as TQRLabel; end; procedure TForm2.Button1Click(Sender: TObject); var i:integer; begin for i:=1 to 2 do mylabels[i].caption:='foo'; end; The QReport in this demo program has two labels on it - QRLabel_1 and QR_Label_2 -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Some pointers
Sergei I have no idea why that post sat around in the ether for over a week and then suddenly appeared. (check the date - the is the true date I posted it) Glad to hear the Indy stuff worked out - one of these days I'd like to take a look at those components. Have heard a lot of good things about them -ns - Original Message - From: Sergei Stenkov [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, October 11, 2001 6:19 AM Subject: RE: [DUG]: Some pointers Thank you Nello, i'll point this out in case this isn't obvious ... It is now. I just didn't know I could pass username and password like that: http://username:[EMAIL PROTECTED]/directory/thefile.txt All I've used before was something like: http://domain.com.au/directory/thefile.htm?p1=blah1p2=blah2 or, could pass them as form variables to another .asp page. I'm ok now. The prog now lets the user to build a list of sites, specifying usernames and passwords. Then, using Indy's TIdHTTP the prog goes through that list and downloads the files specified (either .txt or .csv) and repeats the download each time period specified. Best regards, Sergei Stenkov - Original Message - From: Sergei Stenkov [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 11:59 AM Subject: [DUG]: Some pointers Hi For one of the tasks, my program has to download a couple of text files from a web site. The web site is password protected, and each text file is located on the page of its own. This process will take place once a day and has to be fully automated. I need to make the prog to connect to the site, enter username and password and download the files. Any pointers on where I should start and what components I could use will be appreciated. Best regards, Sergei Stenkov -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Array of labels in QR
I don't see a way to get the Report to recognize array elements in the report design. But if your purpose is to be able to manipulate groups of labels using an index you can use the following shameless hack. Adopt some naming scheme to identify the indexed labels - say for example that the _n suffix will denote the labels[n]. So now - at design time you put labels on your report with names like mylabel_0 mylabel_1 etc Then create a readonly property to the form that hosts the report function GetMyLabel(Index:Integer): TQRLabel; property MyLabels[Index: Integer]: TQRLabel read GetMyLabel; default; function GetMyLabel(Index:Integer):TQRLabel; begin // in production probably should do some error checking ... return FindComponent(format('mylabel_%d',[Index]); end; Now you can do stuff like for i:=0 until 9 do mylabels[i].caption:='foo'; i'm making this up as i write this so caveat emptor - it may not even compile, and i certainly haven't tested it. -Ns - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, October 12, 2001 2:08 AM Subject: [DUG]: Array of labels in QR Hi Is it possible to use an array of QRLabels in a Quick Report? If so, Is it possible to to create and place these at design time? and the next question (design time or run time) would be How? TIA Mark --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Array of labels in QR
need to typcast the return value ... function GetMyLabel(Index:Integer): TQRLabel; property MyLabels[Index: Integer]: TQRLabel read GetMyLabel; default; function GetMyLabel(Index:Integer):TQRLabel; begin // in production probably should do some error checking ... return FindComponent(format('mylabel_%d',[Index]) as TQRLabel; end; -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Some pointers
i'll point this out in case this isn't obvious ... if the pages are protected using .htaccess or similar server directory security, you can pass the user/pass directly via the URL and then GET the file without needing to enter it on a form or something like that. http://username:[EMAIL PROTECTED]/directory/thefile.txt -ns - Original Message - From: Sergei Stenkov [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 11:59 AM Subject: [DUG]: Some pointers Hi For one of the tasks, my program has to download a couple of text files from a web site. The web site is password protected, and each text file is located on the page of its own. This process will take place once a day and has to be fully automated. I need to make the prog to connect to the site, enter username and password and download the files. Any pointers on where I should start and what components I could use will be appreciated. Best regards, Sergei Stenkov -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: fixed all errors
I thought Dave already pointed out this error on 4/10 in his post that read: What is eread? I assume this should be read. What is eName? a TEdit on the form? -ns - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Sunday, October 07, 2001 6:43 PM Subject: [DUG]: fixed all errors i found out what the error was it should have read read(addressfile,tmp); not eread(addressfile,tmp); so thanx for all who helped. ... Brendon Toogood E-Mail [EMAIL PROTECTED] --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Line too long error
a wild guess: is it possible this is a unix/dos txt file format problem? (end of line is CR/LF in DOS and just LF in unix) -ns - Original Message - From: Phil Scadden [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday, October 08, 2001 8:04 AM Subject: [DUG]: Line too long error I've hit this more than once: D5 complaining [Fatal Error] PGSHeightData.pas(1): Line too long (more than 1023 characters) It isnt - and if I put in the other lines, modify it, etc. It still reports this error. Any ideas??? -- Phil Scadden, Institute of Geological and Nuclear Sciences 41 Bell Rd South, PO Box 30368, Lower Hutt, New Zealand Ph +64 4 5704821, fax +64 4 5704603 -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Event trigger
post a WM_Timer message? -ns - Original Message - From: Sergei Stenkov [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, October 05, 2001 11:50 AM Subject: [DUG]: Event trigger Hello, How do I trigger an OnTimer event for a TTimer descendant? I'm building a TTimer descendant component with a couple of additional properties. The problem I have is that I couldn't so far hook onto the OnTimer event of the descendant. Any suggestions are welcome. Thank you. Best regards, Sergei Stenkov -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Borland RAD Seminars - Ak, Wgtn, ChCh
What was the url again? http://www.123.co.nz/docs/borland%20rad%20seminar.doc -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: [Q] Persistent storage of record types....
if you can make your record structures derive from TComponent and define your record data as properties you could read/write to a TStream.I don't think you would need to write your own storage/retrieval code except for data in your structure of custom type. This is the code Delphi uses to save persistent design-time objects as resources in DFM files. -ns - Original Message - From: Donovan J. Edye [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 03, 2001 5:37 AM Subject: [DUG]: [Q] Persistent storage of record types G'Day, I have a number record structures that I want to save the contents of persistently and then retrieve them again. Eg. type TMyRec = record Name : TPersonName; Age : integer; end; Assuming I have: var MyRec : TMyRec; Is there an easy (perhaps using RTTI) that I could save the contents of MyRec to something and then be able to read it back later to fill MyRec again? Or would I have to write my own storage and retrieval operations? TIA -- Donovan -- Donovan J. Edye [www.edye.wattle.id.au] Namadgi Systems [www.namsys.com.au] Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 TVisualBasic = Class(None); Heard just before the 'Big Bang': ...Uh Oh -- GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer replacement. Also includes freeware delphi windows explorer components. -- --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: help with search string
Can someone here with D6 please confirm that '' is still recognised as the empty string? In D5 (and earlier) it is - but perhaps this looks to D6 like an escaped quote and is a syntax error. Guessing here ... -ns - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 02, 2001 8:35 AM Subject: Re: [DUG]: help with search string On Mon, 1 Oct 2001 20:19:31 +1200, you wrote: I think I've spotted it! The syntax highlighting should have shown you what was going on The problem is that you are not terminating the strings correctly (as if you didn't already know that). inputbox( 'Name Search', // string is terminated correctly 'Enter the name you''re looking for', // that's not a double quote, it is 2 single quotes '' // and 2 single quotes again ); thanx but again no it doesn't the same line is highlighted i even changed the youre the your and it still doesn't work. ... Brendon Toogood E-Mail [EMAIL PROTECTED] --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: help with search string
this is quite different from the original problem where the problem lines looked like: //error here// SearchText := inputbox( 'Name Search', 'Enter the name you''re looking for', '' ); you've changed several things and still have the problem - that's new information -ns - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 02, 2001 8:53 AM Subject: Re: [DUG]: help with search string On Tue, 2 Oct 2001 13:41:24 +1200, you wrote: Can you post the original problem again? Thanks Stacey ok Stacey below os the code i am getting the error unterminated string in the line which i will mark for you the error is at compile time and is starting to really piss me off. procedure TForm1.BitBtn7Click(Sender: TObject); var SearchText : string; tmp : address; begin file://error on this line// SearchText := inputbox( 'Name Search', 'Enter the name your looking for'); if (SearchText '') and Find( SearchText ) then begin read( AddressFile, tmp ); eName.text := tmp.Name; eStreetAddress.text := tmp.StreetAddress; ecity.text:=tmp.city; ephone.text:=tmp.phone; emobile.text:=tmp.mobile; eemail.text:=tmp.email; end; end; ... Brendon Toogood E-Mail [EMAIL PROTECTED] --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: help with search string
Are you breaking a string across source lines? You are in my copy of your post - but that might just be my email client (or the least) breaking it. This is a syntax error. Try it like this and see if you still have the problem: SearchText := inputbox( 'Name Search', 'Enter the name you''re looking for', '' ); -ns - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Sunday, September 30, 2001 3:19 PM Subject: [DUG]: help with search string in the following code i get the error undetermined string; any ideas SearchText : string; tmp : address; begin file://error here// SearchText := inputbox( 'Name Search', 'Enter the name you''re looking for', '' ); if (SearchText '') and Find( SearchText ) then begin read( AddressFile, tmp ); eName.text := tmp.Name; eStreetAddress.text := tmp.StreetAddress; ecity.text:=tmp.city; ephone.text:=tmp.phone; emobile.text:=tmp.mobile; eemail.text:=tmp.email; end; end; ... Brendon Toogood E-Mail [EMAIL PROTECTED] --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Break on exception
I have a component that gets a value back from a DLL. The value is a Date BUT it can sometimes be just zero. Do I go try myDate:=GetDateFromDll; except myDate:=now end; what are the types of myDate and GetDateFromDll? TDateTime? normally you don't get an exception if you assign a TDateTime value (even if it's zero).I just tried this: procedure test; var mydate:TDateTime; begin mydate:=0.0; end; and it doesn't raise an exception. What you are describing sounds like something that happens when you try to convert a String to a TDate via StrToDate or something like that. Am I missing something? -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: ActiveX forms and Focus in IE Web Browser.
http://pw1.netcom.com/~cherrman/afrms302.htm has some useful discussion of problems using D3 DAX controls hosted by IE4. Some of this (like the code patch) is out of date but the stuff about UIActivation might be useful. -ns - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday, October 01, 2001 4:39 AM Subject: [DUG]: ActiveX forms and Focus in IE Web Browser. Solutions? This is the old problem of how to get initial focus on your ActiveX form when hosted in Internet explorer (Intranet application) - I thought the solution (or lack of??) had already been posted before, but could not find anything in the DUG archives. Seem to also have the same problem if you switch forms (using parenting or Frames) you seem to lose focus and cannot get it back again. Thanks. Myles Penlington. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Help with searching a .dat file
You don't say whether the data in your .dat file is sorted, or how many entries you are likely to be expecting, or whether you're developing for Win32 or Win16. Win16?Yikes. -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Help with searching a .dat file
Storing data in an unsorted .dat file doesn't also make you go yikes? rotfl touche. you do have me with this one. -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Failure of OverNight routine
Please define what you mean by lock down the server -ns - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, September 21, 2001 6:06 AM Subject: [DUG]: Failure of OverNight routine Hi I have witten a couple of utilities to do some Paradox database maintenance under the control of a scheduler. They are very simple typically running a TQuery script and displaying progress in a TMemo. The site is running NT4 Server and they Lock the server down each night. The utilities are part of an overnight schedule of events which includes a backup. The backup works fine and these utilities start but then stop before running their query. They both run fine if the Server is not locked down. Does anyone know what is happening here? TIA Mark --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Failure of OverNight routine
Mark I just wrote a trivial D5 app that has a form and writes 5000 lines to a memo control and then closes the main form (terminating). Not sure if this is a good simulation of what your app does - but if i start this and then lock my workstation - this app continues to run (writing to the display even though i can't see it) and then exits.It doesn't hang until i unlock or anything like that. So - if locking does impede apps that want to interact with the display it seems it impedes their STARTING some way, but doesn't stop them from executing. I don't have norton schedule (unless maybe its in the NAV somewhere) so i can't try that test. -ns - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, September 21, 2001 9:36 AM Subject: Re: [DUG]: Failure of OverNight routine Further to this (below) - I get the same problem if (rather than Locking the computer) I just log out. Mark Don't think I have any tool that I could use to run a SQL script from a command line (D5 Pro). I can duplicate the problem on my own system. Put the executable in Norton Scheduler and wait for the designated time - it runs perfectly. Do the same but Lock the computer (the screen is blank apart from an Unlock dialog box). When the designated time arrives the screen does a blip the disk does a blip and nothing. When you Unlock the computer the utility completes the run. It appears to continue from a point at the start of accessing the database, but it's hard to say because the only code before that is writing a couple of lines to the Memo - which would happen pretty quick anyway. I find it hard to believe that Locking the computer would prevent an app getting access to the database (locking appears to be a prevention of access through standard input/output). I could believe that the app is stalling because it cannot display stuff on the (locked) screen. Unless I get any posts saying that this should not be a problem, I'll start rewriting it as a console app. Any comments? Mark -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Help with Logic flows
AN APOCRYPHL TALE I agree with Neven's style: if something then begin dostuff end else begin dootherstuff end; When I first learned Pascal in school (during the Jurassic period) we were encouraged to code if/then/else like this: if something then begin dostuff end else begin dootherstuff end; or of not blocked if something then dostuff else dootherstuff; this introduces a symmmetry between the then part and the else part and lets you match them (the then begin and else begin will match up at the same indentation level) This is a true story of a bug that was VERY expensive to repair, and had the above style been used would never have occurred: snip ... it also has the advantage of causing a compiler error another situation similar to the earlier example where the IF line inadvertantly got deleted. ComplexStatement1; ComplexStatement2; ComplexStatement3; ComplexStatement4; ComplexStatement5; IF OnceInABlueMoon THEN DoTheRareThing; -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Foreign Language conversion.
A reasonable place to start is the Microsoft MSDN website. You can search it from here http://search.microsoft.com/us/dev/default.asp This kind of translation is known as localization (usually with a 'z') and searching MSDN on this keyword will get you a lot of material. If you are translating a program that has menus and messages (and control captions etc etc) in resources your task is much simplified. But often you will find programs that were not written with localization in mind will have text embedded in the sourcecode and this can be a big problem for you. Sometimes (often) it is worth some careful thought and perhaps some re-writing to add multiple language support into the application in a systematic way. Something else you need to be aware of is that if your target language uses 16-bit wide characters (Chinese does) you need to look carefully at the mechanisms in the program for handling message strings and buffering them because probably they are set up for 8-bit characters. Also - you usually need to worry about more than just translating menus and messages.You may need to be able to accept input in your local language. This means reading wide strings from text controls and saving them into databases.You have to be careful about buffer sizes, string library calls, sorting, comparing and stuff like that because all of these operations will need to be aware they are operating on wide strings. We've run into some of these problems (because we're in Thailand) but Thai script doesn't require wide charactersets so we haven't had to worry about most of the unicode issues. There is a company http://www.lingscape.com/ that makes some Delphi tools for multi language applications that you may want to investigate.I have never used their product - and my impression is that it is a more a tool for developing multi-language applications (rather than converting them). I hope this is enough to get you started. (You have a fun job ahead of you :-) ) -ns - Original Message - From: Hannah Wang [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, September 12, 2001 9:16 AM Subject: [DUG]: Foreign Language conversion. Hello All, I'm doing some research on the Foreign Language conversion and want to convert all the menus, etc from English to a foreign language script saying like Chinese. Since I'm relative new in this area, It'll be very appreciated if anyone could show me the direction. Any suggestions on where I could find useful information would be great as well. Thanks for your time. kind regards. Hannah Hannah Wang ~~ Health Technology Limited, 308 - 318 Parnell Road, email: [EMAIL PROTECTED] web: http:\\www.htl.co.nz This e-mail and any attachments are intended only for the person to whom it is addressed and may contain privileged, proprietary, or other data protected from disclosure under applicable law. If you are not the addressee or the person responsible for delivering this to the addressee you are hereby notified that reading, copying or distributing this transmission is prohibited. If you have received this e-mail in error, please telephone us immediately and remove all copies of it from your system. Thank you for your co-operation. -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: objectpal/D(anything) conversion
Bevan Thanks for the feedback In my experience it is often better (if not necessary) to rewrite rather than trying to run some sort of conversion. There are too many non-standard or ugly things in Paradox that can be handled much nicer in Delphi/BCB. I had pretty much come to this grim conclusion but wanted to be sure I wasn't missing some clever way out. I'm currently going through this exact same problem with a rather large and cumbersome Paradox project, which started off in version 4 for DOS! It has since progressed through almost every version to Paradox8 (by Corel), which I really despise now. So we've bitten the bullet and are currently converting to BCB and improving dramatically in the process. Hmmm really.I'd be interested in hearing more about this effort if it wouldn't be a lot of trouble. Why BCB instead of Delphi?Especially now that Kylix has arrived - or are you mostly C++ programmers? -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: DesignEditors and Proxies
When trying to convert one of my D4 components to D6 ran into a problem the unit used TPropertyEditors which I duly found in the unit DesignEditors. Added the Path --- source\toolsApi to the library path but Now I get a message can find Proxies.dcu. This is in the Uses list of DesignEditors.pas but there is no sign of a proxies unit in D6 stuff how ever there is in D4 and D5 doesn't seem Quit Right ?? Any Suggestions solutions greatly Appreciated there was a lot of discussion about this recently in one of the borland forums. I don't have D6 (yet :-) ) but ISTR the fix is to add designide.dcp to the designtime requires section of the package you're trying to build. ... and be warned there can be problems if there isn't clean segregation between design time and runtime code. -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: Where to enable Login Component
i looked at this thing yesterday and completely missed that. nice catch -ns - Original Message - From: Edward Aretino [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 5:31 AM Subject: Re: [DUG]: Where to enable Login Component {$DEFINE LOGIN} is what you would use in code - at the top of your unit for instance. In the project options, just use: LOGIN Ed At 13:45 10/09/2001 +1200, you wrote: Hi I want to require a login to my app on one site's copy only. I dropped an RXLib Login component onto the main for of the app and provided some user and password checking code. At design time I can set the login component to active or inactive. That's all works fine BUT If I go Project/Options and add a conditional define {$DEFINE LOGIN} and then do procedure TMainForm.FormCreate(Sender: TObject); begin {$IFDEF LOGIN} RxLoginDialog1.Active := True; {$ENDIF} end; Rebuild - run it doesn't work. What am I missing please? TIA Mark -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
[DUG]: objectpal/D(anything) conversion
does anyone know of any (usable) tools to automate conversions from Paradox ObjectPAL code to Delphi (any version)? Not referring to database issues - only the event-driven UI code in the forms. After looking at this I'm pretty sure it requires a re-write. On the surface they look similar, but they're really not. None of the obvious places turned up anything, but no decent investigation would be complete without checking here. TIA -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: DB Grids
1: Can we disable entry in two out of every three rows? we had a situation where a grid displayed prices for products - but sometimes the price could be edited and sometimes not depending on some complicated (irrelevant) tests. You can do this if you monitor movement within the grid. The DataChange event will notify you when the focus shifts to a new row.Your handler can fiddle with the readonly property for each column to set these the way you want them for the current row. 2: Less importantly can we change the colour of the two detail rows? DBGrid.DrawDataCell will let you draw the cells yourself - you can do whatever you want. In the app i mentioned above we used different font colours. [the app i'm referring to has been through several versions of Delphi - so it may be that there are more modern ways to do this. Also I'm not 100% sure DrawDataCell is still the event for ownerdraw cell drawing. ISTR this changed in one of the Delphi versions] -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: URL Link Checker
I can test the links on files in house and I would assume it would work if I was connected via dialup. But we use a proxy server to access the internet in the outside world. The proxy server requires me to logon. do you mean a HTTP proxy server here? Or do you mean a more general proxy like SOCKS5? -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: drive path extraction
drive:char; driveletter :string[4]; begin for drive:='A' to 'Z' do begin driveletter:=drive+':\'; end; end; the return drive value is always Z:\ your loop changes the value of driveletter 26 times (the first 25 times overwriting the old value). after the 26th and final iteration what is left in driveletter is the last thing you put there. As written, that will be 'Z:\'. this is correct behaviour, but probably not what you intend. [or maybe i'm missing the whole point of this thread] -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Re: [DUG]: drive path extraction
earlier i wrote: your loop changes the value of driveletter 26 times (the first 25 times overwriting the old value). of course on the 26th iteration it overwrites the old value also. So the stuff in the parentheses is correct, but vacuous. No idea why i wrote that. -ns --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of unsubscribe delphi Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/