Re: [lazarus] class-references

2006-08-21 Thread Mattias Gaertner
On Mon, 21 Aug 2006 00:56:35 + Albert Zeyer <[EMAIL PROTECTED]> wrote: > Hello, > > I want to use class-references (class of SOMECLASS) as a way for a > dynamic object factory. > First I tried it with the predefined type TClass (:= class of > TObject), but this doesn't work, because Create is

Re: [lazarus] Lazarus for SPARC

2006-08-21 Thread Mark Morgan Lloyd
I'm going to have to drop Lazarus on SPARC for a few days since I've got a job that needs to be done for the end of the month. The position appears to be that the same compiler sources are OK on Linux/i386, so the SEGV problem (and other exceptions which might be a knock-on effect) are SPARC-speci

Re: [lazarus] class-references

2006-08-21 Thread Albert Zeyer
> I think, RTTI is very powerfull and there should be a way to do the > same as above without a virtual constructor. But is it clean? To use RTTI you must derive from TPersistent or use the {$M+} directive. > In practice, I have a abstract base class with a function like this: > > functi

[lazarus] cdecl external C

2006-08-21 Thread Alain Michaud
Hi, this message is not for reporting a bug but I would like to know more about the following: When I open a "New Project" / "Application", then the following external function WORKS WELL: function j0(x:double):double;cdecl;external 'c'; Now, when I open a "New Project" / "Program", then I g

Re: [lazarus] parameterized queries

2006-08-21 Thread Zlatko Matić
Is there any article explaining how to use parameterized queries in TSQLQuery ?   - Original Message - From: Zlatko Matić To: lazarus@miraclec.com Sent: Sunday, August 20, 2006 2:24 PM Subject: [lazarus] parameterized queries Hello.   I just tried to put

Re: [lazarus] cdecl external C

2006-08-21 Thread Vincent Snijders
Alain Michaud wrote: Hi, this message is not for reporting a bug but I would like to know more about the following: When I open a "New Project" / "Application", then the following external function WORKS WELL: function j0(x:double):double;cdecl;external 'c'; Now, when I open a "New Project

Re: [lazarus] parameterized queries

2006-08-21 Thread Alexandre Leclerc
Simply use the StringReplace() function to replace you parameter with the desired value. Personally, I used the Format function... Format('select * from %s where %s', ['table','a=b']); Best regards. -- Alexandre Leclerc _ To u

Re: [lazarus] class-references

2006-08-21 Thread Mattias Gaertner
On Mon, 21 Aug 2006 14:30:06 + Albert Zeyer <[EMAIL PROTECTED]> wrote: > > > I think, RTTI is very powerfull and there should be a way to do > > > the same as above without a virtual constructor. But is it clean? > > > > To use RTTI you must derive from TPersistent or use the {$M+} > > direct

Re: [lazarus] cdecl external C

2006-08-21 Thread Mattias Gaertner
On Mon, 21 Aug 2006 18:43:15 +0200 Vincent Snijders <[EMAIL PROTECTED]> wrote: > Alain Michaud wrote: > > Hi, > > this message is not for reporting a bug but I would like to know > > more about the following: > > > > When I open a "New Project" / "Application", then the following > > external f

Re: [lazarus] class-references

2006-08-21 Thread Albert Zeyer
Am Montag, den 21.08.2006, 19:17 +0200 schrieb Mattias Gaertner: On Mon, 21 Aug 2006 14:30:06 + Albert Zeyer <[EMAIL PROTECTED]> wrote: > > With TPersistent it would work like this > >TMyBase = class(TPersistent) > >public > > function CreateCopy: TMyBase; > > procedure

[lazarus] Xml

2006-08-21 Thread Wilder Gonzalez Diaz
I am loading xml data using XMLRead unit provided with FCL... But it have encoding problems with tildes... I am working with spanish language so tildes are required... Does anyone knows how to fix this problems? _ To unsubscribe

Re: [lazarus] class-references

2006-08-21 Thread Mattias Gaertner
On Mon, 21 Aug 2006 19:52:34 + Albert Zeyer <[EMAIL PROTECTED]> wrote: > Am Montag, den 21.08.2006, 19:17 +0200 schrieb Mattias Gaertner: > > > On Mon, 21 Aug 2006 14:30:06 + > > Albert Zeyer <[EMAIL PROTECTED]> wrote: > > > > With TPersistent it would work like this > > > >TMyBase =

Re: [lazarus] Xml

2006-08-21 Thread Mattias Gaertner
On Mon, 21 Aug 2006 14:13:48 -0500 "Wilder Gonzalez Diaz" <[EMAIL PROTECTED]> wrote: > I am loading xml data using XMLRead unit provided with FCL... But it > have encoding problems with tildes... I am working with spanish > language so tildes are required... Does anyone knows how to fix this > pro

RE: [lazarus] Xml

2006-08-21 Thread Wilder Gonzalez Diaz
This is the xml file I am trying to load t erey er yy calc_clip_small.swf index.php I am getting an error on li

Re: [lazarus] Xml

2006-08-21 Thread Cesar Romero
Where did you edit that? The editor was configurated to iso-8859-1 or UTF-8? I had problems with that... []s Cesar Romero http://blogs.liws.com.br/cesar Wilder Gonzalez Diaz escreveu: This is the xml file I am trying to load t erey er yy

RE: [lazarus] Xml

2006-08-21 Thread Wilder Gonzalez Diaz
I edit it manually... By using tstringlists -Original Message- From: Cesar Romero [mailto:[EMAIL PROTECTED] Sent: Monday, August 21, 2006 2:50 PM To: lazarus@miraclec.com Subject: Re: [lazarus] Xml Where did you edit that? The editor was configurated to iso-8859-1 or UTF-8? I had probl

Re: [lazarus] Xml

2006-08-21 Thread Mattias Gaertner
On Mon, 21 Aug 2006 14:44:32 -0500 "Wilder Gonzalez Diaz" <[EMAIL PROTECTED]> wrote: > This is the xml file I am trying to load Can you zip it and send it again, too make sure that the special characters are not converted by the mail client? When I copy/paste the test below it works. Mattias

RE: [lazarus] Xml

2006-08-21 Thread Jesus Reyes
--- Wilder Gonzalez Diaz <[EMAIL PROTECTED]> escribió: > This is the xml file I am trying to load > > [..] > > > > And the character is the 'ó' > > How can I solve this? I have tried replacing the xml ISO encoding > to UTF-8 but still having the same problem > Just changing the enco

RE: [lazarus] Xml

2006-08-21 Thread Jesus Reyes
--- Wilder Gonzalez Diaz <[EMAIL PROTECTED]> escribió: > This is the xml file I am trying to load > > [..] > > > > And the character is the 'ó' > > How can I solve this? I have tried replacing the xml ISO encoding > to UTF-8 but still having the same problem > Just changing the enco

[lazarus] Console application

2006-08-21 Thread Fabrício F. Kammer
Hi all, I'm writing an TCP server using synapse and I want that the application runs as a console application to be comptible with linux and windows systems. I did the graphical applicatio using lazarus and running on windows, but I don't know how to make a console application. I'm doing l

Re: [lazarus] parameterized queries

2006-08-21 Thread Joost van der Sluis
Look in the examples in fcl/db/sqldb/examples (You have to set the value of the parameterer before you can make it active) On Mon, 2006-08-21 at 18:16 +0200, Zlatko Matić wrote: > Is there any article explaining how to use parameterized queries in > TSQLQuery ? > > - Original Messa

Re: [lazarus] parameterized queries

2006-08-21 Thread Joost van der Sluis
On Mon, 2006-08-21 at 12:59 -0400, Alexandre Leclerc wrote: > Simply use the StringReplace() function to replace you parameter with > the desired value. Personally, I used the Format function... > > Format('select * from %s where %s', ['table','a=b']); And what if the string %s is : ' table; drop

Re: [lazarus] Console application

2006-08-21 Thread Felipe Monteiro de Carvalho
Put {$apptype console} on your main file, the one with the program directive. -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.laza

Re: [lazarus] cast interface to object

2006-08-21 Thread Flávio Etrusco
On 8/20/06, Albert Zeyer <[EMAIL PROTECTED]> wrote: Hi, Is there a way to cast an interface to an object? If I have an interface: IBlub = interface function GetSomething(): TObject; end; And somewhere, I have: var Blub: IBlub; (...) But is there a better, direct way? It s

Re: [lazarus] Console application

2006-08-21 Thread Fabrício F. Kammer
Hi Felipe, Thanks for your answer. What does this directive do? Are you Brazilian? Felipe Monteiro de Carvalho escreveu: Put {$apptype console} on your main file, the one with the program directive. _ To unsubscribe: mail

Re: [lazarus] Console application

2006-08-21 Thread Felipe Monteiro de Carvalho
On 8/21/06, "Fabrício F. Kammer" <[EMAIL PROTECTED]> wrote: Thanks for your answer. What does this directive do? It tells the compiler to generate a console application under Windows. Has no effect under Linux, because on Unixes all applications are potentially console applications. Are you B

Re: [lazarus] Console application

2006-08-21 Thread A.J. Venter
On Tuesday 22 August 2006 04:04, Felipe Monteiro de Carvalho wrote: > On 8/21/06, "Fabrício F. Kammer" <[EMAIL PROTECTED]> wrote: > > Thanks for your answer. What does this directive do? > > It tells the compiler to generate a console application under Windows. > Has no effect under Linux, because