Re: [DUG]: Timing Resolutions
- Original Message - From: Colin Fraser [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 2:50 PM Subject: RE: [DUG]: Timing Resolutions What are you trying to do?? Myles. Hi Myles, The application was for controlling a robotic arm... I believe the application used to count pulses (from something) as the arm moved but this was proving unreliable as a pulse or two was getting missed. Sounds like rotary encoder stuff. Depending on how high resolution the encoder is it could produce a huge number of transitions per second. We had a problem like this with a machine I helped setup years ago... The application would need to time the movement of the arm... I think they where also looking at a PLC to do the counting and return the counts to the PC, that was another option. Depending on how fast the encoder (or whatever it is) sends pulses a PLC may not be fast enough. We had to build a step-down device to slow the pulse rate down before feeding it to a PLC. If you have access to a reasonably competent electronics person you might want to talk to them about building a little device that converts the pulse stream to an 8-bit number of some sort that you can feed in through a parallel or serial port. I can give you a few ideas about how if you want... Having said that, modern computers are fast enough to handle most stuff of this nature. If you can be sure that you can get an input loop/timer to scan the stream at least twice per transition then you should be able to read the bit stream... then you just have to decode it :) -- Corey Murtagh The Electric Monk Quidquid latine dictum sit, altum viditur. --- 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]: Changing forms to DLLs
I have Marco Cantus Mastering Delphi 3 - its got a good section on creating Dlls. Also, another great resource is the teachyourself everything in 21 days: http://www.kaposnet.hu/books/tysdelphi4/ch19/ch19.htm As far as I can see you have decision to make straight up. Are you going to implement com (and thus other applications can learn abiout the objects in your Dll) or implement a standard dll - in which case the calling program needs to know the exact methods the dll exports. With the latter, creating a dll is a matter of changing the program to a library, adding exports statements and thats pretty much it. The former is a smidgen more complex, but possibly more flexible in the end. -Original Message- From: Steve Peacocke [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 17:35 To: Multiple recipients of list delphi Subject: [DUG]: Changing forms to DLLs I have been looking into converting our large application (10 megs plus even with packages separated) into an EXE with several main DLLs. The problems are that the application calls several miscellaneous function units and objects that are shared by all the other units. I wish to grab several forms of a like nature into a single DLL and do this with between 4-7 DLLs, all with a defined business group (eg, maintenance, entry and reports all pertaining to a particular section will be a single DLL). I have been scanning the internet, some books and the help files to find a reasonable description of how to go about this (I have not done DLLs before). Everything I can find so far talks of total black box DLLs that are relatively easy to do. Can anyone out there direct me to anything on the internet that will tell me how to go about this process? So much has been written, but it's like looking for a needle in a haystack. Steve Peacocke --- 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]: Kylix now Free for Open Source Projects
Hi Guys, Just saw this today on Slashdot: Kylix has been released by Borland under a license which allows you to use Kylix for Open Source projects (ie GPL). It can be downloaded free at Borlands Site. After the bollockings I gave Borland over the last few months about the price of Kylix, I have to congradulate them on this very clever move - its much further than I thought they would go. Kylix is currently at a very reasonable price ( about $450 until the end of August I understand), and I for one have a copy on order - even though I am downloading the Open Source version right now, and initially only intend to write Open Source apps. Of course, if you want to sell your product you have to purchase a copy of Kylix - but thats more than fair now the price has come down. This is almost enough for me to reformat my Windows Machine to Linux :-) Regards, Peter Harrison --- 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 Update question
Thanks for the ideas BUT TADOCommand has the same problem Have tried the same query in Access in it also has the same problem - so the problem is with the Jet Engine - any experts on this out there. Steve Galyer - Original Message - From: Neven MacEwan [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, 25 July 2001 17:21 Subject: Re: [DUG]: SQL Update question Steve Ah! I thought you were using SQL :-) Firstly since it doesn't return a result set use a TADOCommand (not TADOQuery) Secondly I'd try the update syntax from within Access (As the Jet Engine has some strange SQL) HTH Neven - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, 25 July 2001 16:49 Subject: Re: [DUG]: SQL Update question Underlying database is MS Access97 accessed via TADOQuery (ADO Express) using Jet 4. RequestLive is not a property of TADOQuery. ExecSQL comes back with the same error. I want to perform the operation over the entire database. - Original Message - From: Neven MacEwan [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, 25 July 2001 16:51 Subject: Re: [DUG]: SQL Update question Steve You probably have RequestLive and are Opening the query where you should be using ExecSQL, What connection method are you using? Also you should paramerise ClientNumber as you are updating the whole database (triggers would be easier) HTH Neven - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, 25 July 2001 16:30 Subject: Re: [DUG]: SQL Update question This comes back with an error Operation must use an updateable query - Original Message - From: Neven MacEwan [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, 25 July 2001 16:34 Subject: Re: [DUG]: SQL Update question Steve - 3 things 1/ count(*) is prob safer 2/ brackets in the wrong place 3/ Semicolon? Try UPDATE CLIENT SET CLIENT.CardIssuedTotal = (SELECT COUNT(*) FROM CARD WHERE CLIENT.ClientNumber = CARD.ClientNumber) Have you considered doing it in a trigger on CARD? HTH Neven - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, 25 July 2001 15:47 Subject: [DUG]: SQL Update question I have a Client table and a Card table, each client can have any number of cards, what I am attempting to achieve is to update a field in the Client table called CardIssuedTotal with the count of the cards associated with that client. I am using the following SQL statements, however I am getting an error Parameter CARD.CardNumber has no default value UPDATE CLIENT SET CLIENT.CardIssuedTotal = (SELECT COUNT(CARD.CardNumber) FROM CARD GROUP BY CARD.ClientNumber) WHERE (CLIENT.ClientNumber = CARD.ClientNumber); Any assistance appreciated. 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/ -- - 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]: Kylix now Free for Open Source Projects
- Original Message - From: Peter Harrison [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 9:37 AM Subject: [DUG]: Kylix now Free for Open Source Projects Hi Guys, Just saw this today on Slashdot: snip This is almost enough for me to reformat my Windows Machine to Linux :-) I tried last night, but looks like I'm going to have to run Kylix on another machine... I'm not giving up my Debian! : Seriously though, has anyone managed to install it under Debian? If so then there's hope for me yet. -- Corey Murtagh The Electric Monk Quidquid latine dictum sit, altum viditur. --- 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 Update question
From the Access help: This error occurs when the current query's Update To row includes a field from either a crosstab query or select query in which an aggregate (total) was calculated for the field (using either the Totals row or a domain function in the Field row). To update a field using the aggregate of another field, calculate the aggregate in the update query itself, not a different query. Looks like you have to change the code to something like: UPDATE CLIENT SET CardIssuedTotal = DSUM(COUNT(*),CARD, [ClientNumber]=ClientNumber)) Yuk. (I'd still seriously question the need to denormalise though.) Paul Ritchie Radio Computing Services. -Original Message- From: Steve Galyer [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 9:30 AM To: Multiple recipients of list delphi Subject: Re: [DUG]: SQL Update question Thanks for the ideas BUT TADOCommand has the same problem Have tried the same query in Access in it also has the same problem - so the problem is with the Jet Engine - any experts on this out there. 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/
[DUG]: Variants and ActiveX and Delphi strangeness...
I have an odd problem here, I'm creating an ADO object via = CreateOleObject and everything there is sweet, but I'm having problems setting a class variable (integer) to one of the fields. Take the following code: procedure TForm1.Button1Click(Sender: TObject); var Conn, Rs: Variant; i: integer; begin Conn :=3D AConn; Rs :=3D Conn.Execute(Format('SELECT * FROM Btimecontrol WHERE = session_id =3D ''%s''',[ASessionID])); // Setup Session Properties i :=3D Rs.Fields['current_staff_ref']; FCurrentStaffRef :=3D Rs.Fields['current_staff_ref']; // = FCurrentStaffRef is define in the TForm1 public section end; The assignment to i works fine, but the assignment to FCurrentStaffRef = fails with an invalid variant conversion, this is with delphi4, is any = there any reason why this would fail or am I doing something wrong? It'll be = annoying if I have to assign a local variable each time, then set the class = variable to the local one... -- Vi de udødelige inviterer dere til å slå dere sammen med oss --- 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]: Variants and ActiveX and Delphi strangeness...
The simple guess is that the field is NULL and Delphi cannot convert this to an integer ... Myles. -Original Message- From: Mark Derricutt [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 10:59 a.m. To: Multiple recipients of list delphi Subject: [DUG]: Variants and ActiveX and Delphi strangeness... I have an odd problem here, I'm creating an ADO object via = CreateOleObject and everything there is sweet, but I'm having problems setting a class variable (integer) to one of the fields. Take the following code: procedure TForm1.Button1Click(Sender: TObject); var Conn, Rs: Variant; i: integer; begin Conn :=3D AConn; Rs :=3D Conn.Execute(Format('SELECT * FROM Btimecontrol WHERE = session_id =3D ''%s''',[ASessionID])); // Setup Session Properties i :=3D Rs.Fields['current_staff_ref']; FCurrentStaffRef :=3D Rs.Fields['current_staff_ref']; // = FCurrentStaffRef is define in the TForm1 public section end; The assignment to i works fine, but the assignment to FCurrentStaffRef = fails with an invalid variant conversion, this is with delphi4, is any = there any reason why this would fail or am I doing something wrong? It'll be = annoying if I have to assign a local variable each time, then set the class = variable to the local one... -- Vi de udødelige inviterer dere til å slå dere sammen med oss --- 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]: SQL Update question
I have heard the term MSDE - but I don't know exactly what it is - it doesn't appear in the list of Providers when I build a connection string. The environment this system is to be deployed in is a large corporate with strict MS standards - they certainly have Jet 4 - but would further installation be required for MSDE. Steve Galyer - Original Message - From: Neven MacEwan [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, 26 July 2001 10:12 Subject: Re: [DUG]: SQL Update question Steve Considered dropping Jet and using MSDE? Neven --- 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]: Variants and ActiveX and Delphi strangeness...
But it works with a local variable to the procedure, I've tried it with string variants too :( --On Thursday, July 26, 2001 11:07 AM +1200 Myles Penlington [EMAIL PROTECTED] wrote: The simple guess is that the field is NULL and Delphi cannot convert this to an integer ... -- Vi de udødelige inviterer dere til å slå dere sammen med oss --- 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]: Kylix now Free for Open Source Projects
It appears that any Kylix OE app opens a wee dialog box that displays this was written with OE, it must be GPL! (i've only seen a screen shot so far), but to me that sounds $(*#(*$ annoying and bad on Borlands part... unfortunately it's required by the GPL 2(c): c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) GPL is pretty restrictive.There are certainly other more friendly OSS choices - it does seem strange Borland wouldn't have chosen one of them. -ns --On Thursday, July 26, 2001 9:37 AM +1200 Peter Harrison [EMAIL PROTECTED] wrote: This is almost enough for me to reformat my Windows Machine to Linux :-) -- Vi de ud?delige inviterer dere til ? sl? dere sammen med oss --- 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]: Kylix now Free for Open Source Projects
WOW! I wounder if the slashdot crowd have realised THAT one Somehow I think they might have missed it. N - Original Message - From: Nello Sestini [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 12:36 PM Subject: Re: [DUG]: Kylix now Free for Open Source Projects It appears that any Kylix OE app opens a wee dialog box that displays this was written with OE, it must be GPL! (i've only seen a screen shot so far), but to me that sounds $(*#(*$ annoying and bad on Borlands part... unfortunately it's required by the GPL 2(c): c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) GPL is pretty restrictive.There are certainly other more friendly OSS choices - it does seem strange Borland wouldn't have chosen one of them. -ns --On Thursday, July 26, 2001 9:37 AM +1200 Peter Harrison [EMAIL PROTECTED] wrote: This is almost enough for me to reformat my Windows Machine to Linux :-) -- Vi de ud?delige inviterer dere til ? sl? dere sammen med oss --- 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]: Kylix now Free for Open Source Projects
Well, I for one am GLAD that there is a Trial version avalible for downloading. Ok. its Trial, BUT aleast I can NOW try it out. I have also downloaded the OE version...so I am quite keen to see how it looks and how it works. Jeremy Coulter -Original Message- From: Nic Wise [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Date: Thu, 26 Jul 2001 12:50:45 +1200 Subject: Re: [DUG]: Kylix now Free for Open Source Projects WOW! I wounder if the slashdot crowd have realised THAT one Somehow I think they might have missed it. N - Original Message - From: Nello Sestini [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 12:36 PM Subject: Re: [DUG]: Kylix now Free for Open Source Projects It appears that any Kylix OE app opens a wee dialog box that displays this was written with OE, it must be GPL! (i've only seen a screen shot so far), but to me that sounds $(*#(*$ annoying and bad on Borlands part... unfortunately it's required by the GPL 2(c): c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) GPL is pretty restrictive.There are certainly other more friendly OSS choices - it does seem strange Borland wouldn't have chosen one of them. -ns --On Thursday, July 26, 2001 9:37 AM +1200 Peter Harrison [EMAIL PROTECTED] wrote: This is almost enough for me to reformat my Windows Machine to Linux :-) -- Vi de ud?delige inviterer dere til ? sl? dere sammen med oss --- 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]: SQL Update question
Steve MSDE is the free workstation edition of MS SQL 7, If you have any visual studio products you can distribute it free As for providors you use the MS SQL one HTH Neven - Original Message - From: Steve Galyer [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, 26 July 2001 11:32 Subject: Re: [DUG]: SQL Update question I have heard the term MSDE - but I don't know exactly what it is - it doesn't appear in the list of Providers when I build a connection string. The environment this system is to be deployed in is a large corporate with strict MS standards - they certainly have Jet 4 - but would further installation be required for MSDE. Steve Galyer - Original Message - From: Neven MacEwan [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, 26 July 2001 10:12 Subject: Re: [DUG]: SQL Update question Steve Considered dropping Jet and using MSDE? Neven -- - 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]: Static Vars
I should know this one but, does OP have an equivalent to C's static type ? --- 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]: Static Vars
Dunno how C does it, but you can (apparently) declare a variable in the procedures const section: procedure Dowhatever; const MyVariable : Integer = 0; begin Inc(MyVariable); end; -Original Message- From: James Sugrue [mailto:[EMAIL PROTECTED]] Sent: 26 July 2001 14:44 To: Multiple recipients of list delphi Subject: [DUG]: Static Vars I should know this one but, does OP have an equivalent to C's static type ? --- 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]: Static Vars
Hi James If you are talking about static methods you add 'class' to front of the declaration and definition. type TMyClass = class FCannotAccess: integer; class function MyName: string; end; class function TMyClass.MyName:string; begin result := 'XYZ; end; you may calli MyName with either aString := TMyClass.MyName or AMyClassVar.MyName; Note: you cannot access FCannotAccess in the class method. For static local variables (i.e. in routines) see Delphi help on typed constants. Cheers Mike -Original Message- From: James Sugrue [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 14:44 To: Multiple recipients of list delphi Subject: [DUG]: Static Vars I should know this one but, does OP have an equivalent to C's static type ? --- 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]: Static Vars
Hi James, I forgot, Static variables in C++ classes do not have an exact equivalent in OP, but the can be mimicked with class methods and variable declared within the module. Thus:- class MyClass procedure SetClassId(AValue: Integer); function GetClassId: Integer; end; implementation var AClassId:Integer = 0; procedure SetClassId.MyClassId( AValue: Integer); begin AClassId:= AValue; end; function MyClass.GetClassId: Integer; begin result := AClassId; end; -Original Message- From: James Sugrue [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 14:44 To: Multiple recipients of list delphi Subject: [DUG]: Static Vars I should know this one but, does OP have an equivalent to C's static type ? --- 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]: Static Vars
James, you can declare variables in the Implementation section of a unit and assuming that there is only one class in the unit, it should behave like a static variable - ie. one instance per class. John -Original Message- From: James Sugrue [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 12:44 pm To: Multiple recipients of list delphi Subject: [DUG]: Static Vars I should know this one but, does OP have an equivalent to C's static type ? --- 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]: Static Vars
Thanks to all those who replied. -Original Message- From: Manning, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 15:46 To: Multiple recipients of list delphi Subject: RE: [DUG]: Static Vars James, you can declare variables in the Implementation section of a unit and assuming that there is only one class in the unit, it should behave like a static variable - ie. one instance per class. John -Original Message- From: James Sugrue [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 12:44 pm To: Multiple recipients of list delphi Subject: [DUG]: Static Vars I should know this one but, does OP have an equivalent to C's static type ? --- 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]: Lan base vs WAN/Web based Databases
I have a customer based in the US who wants a database which to start with will be LAN based. 18 months from now he wants to make it a web based app so that reps can access it from anywhere in the US. Is there any point in designing the LAN based version and then porting it to web based or is it a major shift? The reason I ask this is that in order to set up a web based app we need to invest lots of money and upgrade to Delphi 6 Enterprise (I currently use Delphi 5 Professional). This means that the customer will also be investing a lot more money up front in order to make purchasing Enterprise affordable for us and the project worth doing. Also is there any point in looking at other packages that allow an app to be web based (apart from Delphi Enterprise) that is cheaper? As an aside - the reason they are asking for a NZ based company is the exchange rate. i.e. $120 an hour here is a lot better than $120 an hour over there... Maybe we're not charging enough :) Thanks in advance, Steve Aish OCOM --- 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]: Lan base vs WAN/Web based Databases
If you design it right, then there should be no changes to the DB at all. Ie. Just plug on a new front end. To have this kind of ability you will need a n tier system e.g Something along the lines of Midas, or (EJB etc). I.e. Your GUI screen is just a view/presentation of the middle tier business logic. You could do it all in D5 professional if you use an alternative to Midas ... Myles. -Original Message- From: Steve Aish [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 5:51 p.m. To: Multiple recipients of list delphi Subject: [DUG]: Lan base vs WAN/Web based Databases I have a customer based in the US who wants a database which to start with will be LAN based. 18 months from now he wants to make it a web based app so that reps can access it from anywhere in the US. Is there any point in designing the LAN based version and then porting it to web based or is it a major shift? The reason I ask this is that in order to set up a web based app we need to invest lots of money and upgrade to Delphi 6 Enterprise (I currently use Delphi 5 Professional). This means that the customer will also be investing a lot more money up front in order to make purchasing Enterprise affordable for us and the project worth doing. Also is there any point in looking at other packages that allow an app to be web based (apart from Delphi Enterprise) that is cheaper? As an aside - the reason they are asking for a NZ based company is the exchange rate. i.e. $120 an hour here is a lot better than $120 an hour over there... Maybe we're not charging enough :) Thanks in advance, Steve Aish OCOM --- 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]: Lan base vs WAN/Web based Databases
Steve You will probably get a more informed reply from someone else - but as I understand it you DON'T need to get Enterprise to do this if you just use a Server database (say Interbase) and use the Asta components to give you access over the Web. Havn't got the web address handy but it should be easy to find. Mark - Original Message - From: Steve Aish [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 5:51 PM Subject: [DUG]: Lan base vs WAN/Web based Databases I have a customer based in the US who wants a database which to start with will be LAN based. 18 months from now he wants to make it a web based app so that reps can access it from anywhere in the US. Is there any point in designing the LAN based version and then porting it to web based or is it a major shift? The reason I ask this is that in order to set up a web based app we need to invest lots of money and upgrade to Delphi 6 Enterprise (I currently use Delphi 5 Professional). This means that the customer will also be investing a lot more money up front in order to make purchasing Enterprise affordable for us and the project worth doing. Also is there any point in looking at other packages that allow an app to be web based (apart from Delphi Enterprise) that is cheaper? As an aside - the reason they are asking for a NZ based company is the exchange rate. i.e. $120 an hour here is a lot better than $120 an hour over there... Maybe we're not charging enough :) Thanks in advance, Steve Aish OCOM -- - 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]: Changing forms to DLLs
Thanks James. It had some good stuff there but unfortunately did not go far enough. I'm simply attempting to break up a large app into smaller units that will only be called by the main app so I am looking at standard DLLs or even packages. Steve At 08:44 am 26.07.01, you wrote: I have Marco Cantus Mastering Delphi 3 - its got a good section on creating Dlls. Also, another great resource is the teachyourself everything in 21 days: http://www.kaposnet.hu/books/tysdelphi4/ch19/ch19.htm As far as I can see you have decision to make straight up. Are you going to implement com (and thus other applications can learn abiout the objects in your Dll) or implement a standard dll - in which case the calling program needs to know the exact methods the dll exports. With the latter, creating a dll is a matter of changing the program to a library, adding exports statements and thats pretty much it. The former is a smidgen more complex, but possibly more flexible in the end. --- 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]: Lan base vs WAN/Web based Databases
I would normally set up an interbase system anyway due to the reasonable cost but it's not necessary as I am currently running a web app using DBISAM - just ensure that you dump the BDE. You don't need the V6 upgrade or the enterprise version if you forget the fancy WebSnap buzzword. You can do everything required in D5 professional. Steve At 05:51 pm 26.07.01, you wrote: I have a customer based in the US who wants a database which to start with will be LAN based. 18 months from now he wants to make it a web based app so that reps can access it from anywhere in the US. Is there any point in designing the LAN based version and then porting it to web based or is it a major shift? The reason I ask this is that in order to set up a web based app we need to invest lots of money and upgrade to Delphi 6 Enterprise (I currently use Delphi 5 Professional). This means that the customer will also be investing a lot more money up front in order to make purchasing Enterprise affordable for us and the project worth doing. Also is there any point in looking at other packages that allow an app to be web based (apart from Delphi Enterprise) that is cheaper? As an aside - the reason they are asking for a NZ based company is the exchange rate. i.e. $120 an hour here is a lot better than $120 an hour over there... Maybe we're not charging enough :) Thanks in advance, Steve Aish OCOM --- 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]: Lan base vs WAN/Web based Databases
Steve wrote: Is there any point in designing the LAN based version and then porting it to web based or is it a major shift? Generally speaking, it is a major shift, not least in UI terms. You can encapsulate DB functionality nicely, but UI options are much more limited via a browser. Though you can always skip using a browser if you want, and exchange XML instead between XML- savvy apps at both ends g. The reason I ask this is that in order to set up a web based app we need to invest lots of money and upgrade to Delphi 6 Enterprise (I currently use Why? OIC, you want to use the Web stuff built into Enterprise. You don't need to. Also is there any point in looking at other packages that allow an app to be web based (apart from Delphi Enterprise) that is cheaper? Sure you could. For example, we've been using WebHub from http://www.href.com for about six years now, bypassing the total rewrite of Delphi Enterprise's Web approach which happens about every second Delphi release. WebHub for D4/D5 is available now, D6 very soon I gather. As an aside - the reason they are asking for a NZ based company is the exchange rate. i.e. $120 an hour here is a lot better than $120 an hour over there... Maybe we're not charging enough :) Do allow plenty of time for the Web stuff. No matter what enabling technology you use, there's more to it than meets the eye... 'best. cheers, peter Peter Hyde, SPIS Ltd WebCentre Ltd , Christchurch, New Zealand * http://BusinessDailyReview.com - daily analysis, strategy, ideas * http://TurboNote.com - sticky notes and instant messaging * Web automation for online periodicals: http://TurboPress.com --- 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/