[lazarus] Getting a svn update while Packages are used - Lazarus undo's the changes.
Hi, I've noticed this a few times now and was wondering if it could be fixed or improved on (and if I should report it as a bug or feature request). In summary, changes to packages get undone while Lazarus is open! Lets use an example to explain. If I have Lazarus open and loaded one of my projects that have required packages list. One of those required packages are fpGUI. I don't actually have the Package open, only the project! Now if I get a svn update for fpGUI while Lazarus is open and the update had changes to the fpGUI changes, Lazarus will overwrite the changes with what's loaded in memory. The Lazarus Editor will detect the changed files and ask if you want to reload it, but when it comes to Packages, Lazarus simply overwrites the package .pas file. This happened again to me today. I did some development work over the weekend at home. I added a new unit to the fpGUI package. Today I got to work, open my project and realized I needed to get a fpGUI update. Got a update, then double clicked in Project Inspector window on one of the required packages, so I can open the fpGUI package, so I can recompile it. Again, the new unit I added didn't appear in the fpGUI package. Did a 'svn diff' and it shows that the package's .pas file was modified and the new unit was removed Very frustrating. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLite 3 datetime and timestamp
En/na Luiz Americo Pereira Camara ha escrit: - Try sqlitepass and sqldb/sqlite3. I vaguely remenber of sqlitepass to support timestamp. I don't know about sqldb. Note that sqlitepass is windows only (at least it was last time I looked). You can also use zeos, it is cross platform but I didn't check if/how it does support timestamps with sqlite (since, as Luiz explained, you can put any data type in any sqlite column). Bye -- Luca Olivetti Wetron Automatización S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLite 3 datetime and timestamp
Hi Luiz, first of all, thanks a lot for the good job you did with sqlite for us all! So, now my app can understand a timestamp field as a TDateTime instead of a string... .. [removed] ... Here's how sqlite works (for good and bad): - You can create tables with any field type: TIMESTAMP, TIME_STAMP, QWERTY etc - In any of this field type you can store anything: a integer, a float, a string Many sqlite managers make assumptions (each one create its own .. [removed] ... I'm perfectly aware of that and I'm living happily with it...it's an embedded database anyway! I don't expect a QWERTY type to be understood, of course, but I thought a timestamp might, because the sqlite.org documentation http://www.sqlite.org/lang_createtable.html refers to it. And SQLiteAdmin and SQLite Manager and SQLite Firefox extension can understand it. Anyway, as you said, it is opensource and with a very open license, so I just added the three lines of code I needed: my post number 1) is just to share it. The code needed is only: Index: sqlite3ds.pas === --- sqlite3ds.pas (revision 100) +++ sqlite3ds.pas (working copy) @@ -165,6 +165,10 @@ begin AType:= ftTime; FieldSize:=SizeOf(TDateTime); + end else if (ColumnStr = 'TIMESTAMP') then + begin + AType:= ftDateTime; + FieldSize:=SizeOf(TDateTime); end else if (ColumnStr = 'TEXT') then begin AType:= ftMemo; It's not expensive from the point of view of the code performance nor lightweight. Even better, one could also assign AType := ftTimeStamp (which is alreay defined in db.pas) and then change also db.pas accordingly: Index: db.pas === --- db.pas (revision 101) +++ db.pas (working copy) @@ -1900,7 +1900,7 @@ { ftInterface} Nil, { ftIDispatch} Nil, { ftGuid} TGuidField, - { ftTimeStamp} Nil, + { ftTimeStamp} TDateTimeField, { ftFMTBcd} Nil, { ftFixedWideString} TWideStringField, { ftWideMemo} TWideMemoField I haven't seen the source code of the tools I mentioned above, but I guess that sqlite3ds would behave in the same way if you change the IFs like: if (ColumnStr = 'TIME') into if ( Pos('TIME',ColumnStr) 0 ) which is similar to what you do with BOOL, except that 0 understands the CURRENT_TIME type that you can find in the documentation of sqlite _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLite 3 datetime and timestamp
Now, about assumptions. in sqlite3ds there is the assumption that BOOLEAN fields are stored as 1 or 0. In fact, to recover a db that had TRUE and FALSE, I made a new class where I changed ftBool to fString. In this way I could read them, parse them and then write them back as 1 or 0. With the dates, the problem is similar, because sqlite3ds understands that the field is of type DATE, and so it makes the following assumption in customsqliteds.pas line 603: ftFloat,ftDateTime,ftTime,ftDate,ftCurrency: begin Val(StrPas(FieldRow),Double(Buffer^),ValError); Result:= ValError = 0; end; In the database I have, the dates are in the ISO standard form 2007-12-03 12:11:10.1234 How do you suggest me to handle with them ? 1) by complicating the SQL queries with SELECT date(field_name) as field_name FROM... which turns the field_name into a string in the result set 2) by subclassing or anyway changing the TFieldType ? 3) like with boolean, by making a special temporary class that parses the whole database (not so big) and changes the dates into Freepascal-style doubles (are they stored more efficiently ?) 4) other (please specify :-)) My brain-storming last night came up with the idea of adding a flag that says force every field as a string: this would let someone who doesn't know which convention was used in which field to inspect it. Is it somewhat crazy ? By the way, I really like sqlite and the unit you made to access it. When the project I'm working on is finished, I'll strip everything from the source code and only leave a detailed tutorial for using sqlite without visual components. Meanwhile, I read somewhere in the mailing that you are writing a documentation for sqlite3ds; is it ready or partially ready ? I'm studying the whole code at the moment and some documentation would help a lot, especially to see the global structure, to get the large picture of it. Moreover, I'm going to keep on working a lot with sqlite, so if some contribution is needed somewhere, let me know. Thanks a lot, Roberto _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Patch for Forms in Forms or MDI
This patch fixes the problem that if I put a form in another it is locked. If You remember if I have two forms and write: Form2.Parent := Panel1; Form2.Align := alClient; I have form2 into the Panel1 (in Form1) but the form1 it's locked Index: customform.inc === --- customform.inc (revision 13125) +++ customform.inc (working copy) @@ -907,7 +907,7 @@ DebugLn('[TCustomForm.WndProc] ',Name,':',ClassName); {$ENDIF} LCLIntf.SetFocus(FocusHandle); -Exit; +//Exit; //if I put exit do not work forms in forms end; end; end; begin:vcard fn:David Guadagnini n:Guadagnini;David org:Biotecnica Instruments S.p.A.;RD adr:;;Via Licenza 18;Roma;RM;00133;Italy email;internet:[EMAIL PROTECTED] title:Software architet tel;work:+39064112616 x-mozilla-html:FALSE version:2.1 end:vcard
Re: [lazarus] SQLite 3 datetime and timestamp
En/na Roberto Padovani ha escrit: When the project I'm working on is finished, I'll strip everything from the source code and only leave a detailed tutorial for using sqlite without visual components. FWIW to do that you can also use sqlite3 directly (or with a thin wrapper), you don't have the convenience of a full dataset descendant but you have complete control on what you get from the database. Bye -- Luca Olivetti Wetron Automatización S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Movable Tabs on Code Editor
On Sun, 02 Dec 2007 18:16:05 -0500 Lee Jenkins [EMAIL PROTECTED] wrote: [...] And not to be greedy, but a Close All Other Tabs item on the short cut menu for tabs would be very nice as well. This function is currently somewhat hidden: Some widgetset have close buttons on the tabs (e.g. gtk). Click with Ctrl to close all other tabs. Maybe this could be added to the popup menu. But it is already too long for some screen resolutions. More sub menus are needed. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Startlazarus.exe now useless, or may be even harmful !?
On Fri, 30 Nov 2007 13:58:11 +0100, Vincent Snijders wrote: You should not build the starter from the IDE, if you started lazarus with startlazarus. Out of curiosity, what is the difference between lazarus startlazarus? They both seem to do the same thing to me. -- Cheers, Dave _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Getting a svn update while Packages are used - Lazarus undo's the changes.
On Mon, 3 Dec 2007 10:13:22 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I've noticed this a few times now and was wondering if it could be fixed or improved on (and if I should report it as a bug or feature request). In summary, changes to packages get undone while Lazarus is open! Lets use an example to explain. If I have Lazarus open and loaded one of my projects that have required packages list. One of those required packages are fpGUI. I don't actually have the Package open, only the project! Now if I get a svn update for fpGUI while Lazarus is open and the update had changes to the fpGUI changes, Lazarus will overwrite the changes with what's loaded in memory. The Lazarus Editor will detect the changed files and ask if you want to reload it, but when it comes to Packages, Lazarus simply overwrites the package .pas file. This happened again to me today. I did some development work over the weekend at home. I added a new unit to the fpGUI package. Today I got to work, open my project and realized I needed to get a fpGUI update. Got a update, then double clicked in Project Inspector window on one of the required packages, so I can open the fpGUI package, so I can recompile it. Again, the new unit I added didn't appear in the fpGUI package. Did a 'svn diff' and it shows that the package's .pas file was modified and the new unit was removed Very frustrating. At the moment the following files are not auto reloaded when changed on disk: lpk, lpi and the IDE config files Please create a feature request. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Getting a svn update while Packages are used - Lazarus undo's the changes.
On 03/12/2007, Mattias Gaertner [EMAIL PROTECTED] wrote: At the moment the following files are not auto reloaded when changed on disk: lpk, lpi and the IDE config files Please create a feature request. Thanks, done. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Startlazarus.exe now useless, or may be even harmful !?
* Vincent Snijders [EMAIL PROTECTED] [Fri, 30 Nov 2007 13:58:11 +0100]: Andrey Gusev schreef: Lazarus 13085. I try to rebuild lazarus from IDE itself. Got: --- C:\Works-FPC\lazarus-snap\ide\startlazarus.lpr(51,1) Error: Can't create object file: ..\startlazarus.exe C:\Works-FPC\lazarus-snap\ide\startlazarus.lpr(51,1) Fatal: Can't create executable ..\startlazarus.exe --- You should not build the starter from the IDE, if you started lazarus with startlazarus. I only take Clean Up + Build All from Quick Build Options, Starter clean+build was acts from there. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Startlazarus.exe now useless, or may be even harmful !?
Andrey Gusev schreef: * Vincent Snijders [EMAIL PROTECTED] [Fri, 30 Nov 2007 13:58:11 +0100]: Andrey Gusev schreef: Lazarus 13085. I try to rebuild lazarus from IDE itself. Got: --- C:\Works-FPC\lazarus-snap\ide\startlazarus.lpr(51,1) Error: Can't create object file: ..\startlazarus.exe C:\Works-FPC\lazarus-snap\ide\startlazarus.lpr(51,1) Fatal: Can't create executable ..\startlazarus.exe --- You should not build the starter from the IDE, if you started lazarus with startlazarus. I only take Clean Up + Build All from Quick Build Options, Starter clean+build was acts from there. I guess the Build All was too simplistic. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Startlazarus.exe now useless, or may be even harmful !?
On Mon, 03 Dec 2007 11:37:54 +0100 (CET) Dave Parsons [EMAIL PROTECTED] wrote: On Fri, 30 Nov 2007 13:58:11 +0100, Vincent Snijders wrote: You should not build the starter from the IDE, if you started lazarus with startlazarus. Out of curiosity, what is the difference between lazarus startlazarus? They both seem to do the same thing to me. startlazarus is a wrapper application to start lazarus. It's main purpose is to start the right lazarus executable and to restart it, when the IDE was rebuilt. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Lazarus on a Windows without admin privileges
When running the windows installer, the libqt4intf.dll can not be installed in the system32 folder. It is a problem for all windows accounts without admin privileges. -- Damien Gerard [EMAIL PROTECTED] People who used magic without knowing what they were doing usually came to a sticky end. All over the entire room, sometimes. -- (Terry Pratchett, Moving Pictures) _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on a Windows without admin privileges
Damien Gerard schreef: When running the windows installer, the libqt4intf.dll can not be installed in the system32 folder. It is a problem for all windows accounts without admin privileges. You can uncheck that option, can't you? Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Movable Tabs on Code Editor
Mattias Gaertner wrote: On Sun, 02 Dec 2007 18:16:05 -0500 Lee Jenkins [EMAIL PROTECTED] wrote: [...] And not to be greedy, but a Close All Other Tabs item on the short cut menu for tabs would be very nice as well. This function is currently somewhat hidden: Some widgetset have close buttons on the tabs (e.g. gtk). Click with Ctrl to close all other tabs. Maybe this could be added to the popup menu. But it is already too long for some screen resolutions. More sub menus are needed. Ah, ok. I had thought those menu items were for scrolling the tabs left or right (like using the left right arrow buttons to the right of the tabs). A quick key assignment of CTRL or CTRL works nicely. Thanks guys, -- Warm Regards, Lee My wife is better at Guitar Hero than I am and it's really irritating. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on a Windows without admin privileges
On Dec 3, 2007, at 2:39 PM, Vincent Snijders wrote: Damien Gerard schreef: When running the windows installer, the libqt4intf.dll can not be installed in the system32 folder. It is a problem for all windows accounts without admin privileges. You can uncheck that option, can't you? Yes of course. Vincent -- Damien Gerard [EMAIL PROTECTED] People who used magic without knowing what they were doing usually came to a sticky end. All over the entire room, sometimes. -- (Terry Pratchett, Moving Pictures) _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial Comm Support Windows
Look at your inbox. 2007/12/2, Stephano [EMAIL PROTECTED]: Florian Klaempfl wrote: May I add this to the rtl? Luis Hilario modified FPC's Unix serial.pp unit for use under windows (which I have not tested). You can refer to the following post: http://www.mail-archive.com/lazarus@miraclec.com/msg15211.html I presume it would fall under FPC's modified LGPL. But I will email him anyway to get his approval. His post mentions 2 additional issues: 1- SerOpen return value of 0 or -1 in case of error. 2- Unix/termios and Windows/DCB structures are different. Maybe a common structure should be used to have cross-platform support? Stephano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- http://luisdigital.com _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Serial Comm Support Windows
Luis R. Hilario B. wrote: Look at your inbox. 2007/12/2, Stephano [EMAIL PROTECTED]: Florian Klaempfl wrote: May I add this to the rtl? My inbox contained a positive answer :) Florian, I will send you privately the approval for reference. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] cross compile CPU_TARGET fails
All the instructions I can find on building a cross compiler say to pas CPU_TARGET and OS_TARGET as makefile parameters. (According to: http://wiki.lazarus.freepascal.org/Cross_compiling http://wiki.freepascal.org/WinCE_port etc) But when I use this notation, the make fails because it can't find the to-be-build binary already built: make clean all CPU_TARGET=arm OS_TARGET=OS_TARGET Makefile:129: *** Compiler ppcrossarm not found. Stop. Of course it can't find ppcrossarm, it's supposed to be building ppcrossarm! It doesn't matter if I use make target crossall or pass CROSSCOMPILE=1 it still complains When I look in the makefile, it is built like that: ifndef FPC FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH ifneq ($(FPCPROG),) FPCPROG:=$(firstword $(FPCPROG)) ifneq ($(CPU_TARGET),) FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB) else FPC:=$(shell $(FPCPROG) -PB) endif So if I specify CPU_TARGET I must also specify FPC, but the makefile seems very devoted to working out what FPC should be, so I hate to override it like that. Perhaps this is only problem when building the compiler itself? But this still doesn't seem to compile arm; the build output shows things like: # make --debug=vij crossall CPU_TARGET=arm OS_TARGET=wince FPC=/usr/bin/ppc386 ... ... /tmp/fpc_patchdir/fpc/compiler/ppc -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fii386 -FE. -FU/tmp/fpc_patchdir/fpc/rtl/units/i386-linux -di386 -dRELEASE ../objpas/fmtbcd.pp I guess my invocation is supposed to be for building the rtl and such like, not actually building a cross compiler. Which doesn't explain all the wiki pages using this notation to build the cross compiler How should one tell the makefile to build a cross compiler, i.e. that runs on the native CPU/OS but compiles code for the new CPU/OS Sam _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: cross compile CPU_TARGET fails
Never mind, I seem to have guessed right sayingL FPC= Sam Sam Liddicott wrote: All the instructions I can find on building a cross compiler say to pas CPU_TARGET and OS_TARGET as makefile parameters. (According to: http://wiki.lazarus.freepascal.org/Cross_compiling http://wiki.freepascal.org/WinCE_port etc) But when I use this notation, the make fails because it can't find the to-be-build binary already built: make clean all CPU_TARGET=arm OS_TARGET=OS_TARGET Makefile:129: *** Compiler ppcrossarm not found. Stop. Of course it can't find ppcrossarm, it's supposed to be building ppcrossarm! It doesn't matter if I use make target crossall or pass CROSSCOMPILE=1 it still complains When I look in the makefile, it is built like that: ifndef FPC FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH ifneq ($(FPCPROG),) FPCPROG:=$(firstword $(FPCPROG)) ifneq ($(CPU_TARGET),) FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB) else FPC:=$(shell $(FPCPROG) -PB) endif So if I specify CPU_TARGET I must also specify FPC, but the makefile seems very devoted to working out what FPC should be, so I hate to override it like that. Perhaps this is only problem when building the compiler itself? But this still doesn't seem to compile arm; the build output shows things like: # make --debug=vij crossall CPU_TARGET=arm OS_TARGET=wince FPC=/usr/bin/ppc386 ... ... /tmp/fpc_patchdir/fpc/compiler/ppc -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fii386 -FE. -FU/tmp/fpc_patchdir/fpc/rtl/units/i386-linux -di386 -dRELEASE ../objpas/fmtbcd.pp I guess my invocation is supposed to be for building the rtl and such like, not actually building a cross compiler. Which doesn't explain all the wiki pages using this notation to build the cross compiler How should one tell the makefile to build a cross compiler, i.e. that runs on the native CPU/OS but compiles code for the new CPU/OS Sam _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Main Form retreiving data from Child Form
Hi All, I have an MDI application in which I have two forms. Form1 (Main form) and form2 (Child Form). In form 2 I have some TComboBox and TEdit Components. In the main form I have some TEdit components. I would like Form1(MainForm) TEditBox to have info from Form2(Child Form) TEditBox. I thought of two ways of doing this and would like to know if there is a better way Method 1. TIniFile. When I close form2 I write to a .ini the contents of form2. Then When I Activate Form1 (OnActivate) I read the info from .ini and fill in the info into the TEdit. Method 2. I use global variables. When I close Form2 I have global variables that store the contents of TEdit from Form2. When I go to Activate form1(OnActivate) I use the global variables and assign to the TEdit in Form1. Please let me know if there is a better way. I do not feel too good about global variables since it is a little scary and not good practise and TIniFiles are a little cubersome. Is there a better way in Lazarus. Thanks Lefti
Re: [lazarus] Docking
Open Perl IDE: http://open-perl-ide.sourceforge.net/ Ported + examples (including compiled demo): http://www.torry.net/pages.php?s=79 (DockPanel Professional v.3.1) Would this be a usable/reliable docking mechanisme for Lazarus? (Its not really a big issue, but i do truely miss window docking) I just took a quick look: - It does not work with TForm, but only with the TDockPanel descendants. - It does not compile with LCL, because of missing IDockManager. You must have compiled the perl variant because the ported one from torry is not using the idockmanager. From what i've seen (and this is not exactly my area of expertice) the clientforms must be inherited from TDockableForm and the host form has to have some panels to determine the landing position (left, right, bottom etc.). Wen docked on one of the dockpanels a dynamic pagecontrol/tabsheet is created and the form is docked onto it. It worked real nice in delphi but i cant get it to work in lazarus. It looks like lcl hasn't all events onboard or not all are supported or working (i can send you my sources if you're interested) Probably some more things are missing. So I was not able to test it. Maybe you can describe what it can, what not under Delphi? The pictures on http://open-perl-ide.sourceforge.net/#screenshots tell it i guess. And the torry download has a working executable demo. Greetings, Marius _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Docking
On Mon, 03 Dec 2007 19:06:55 +0100 huisvuil [EMAIL PROTECTED] wrote: Open Perl IDE: http://open-perl-ide.sourceforge.net/ Ported + examples (including compiled demo): http://www.torry.net/pages.php?s=79 (DockPanel Professional v.3.1) Would this be a usable/reliable docking mechanisme for Lazarus? (Its not really a big issue, but i do truely miss window docking) I just took a quick look: - It does not work with TForm, but only with the TDockPanel descendants. - It does not compile with LCL, because of missing IDockManager. You must have compiled the perl variant because the ported one from torry is not using the idockmanager. From what i've seen (and this is not exactly my area of expertice) the clientforms must be inherited from TDockableForm and the host form has to have some panels to determine the landing position (left, right, bottom etc.). Wen docked on one of the dockpanels a dynamic pagecontrol/tabsheet is created and the form is docked onto it. It worked real nice in delphi but i cant get it to work in lazarus. It looks like lcl hasn't all events onboard or not all are supported or working (i can send you my sources if you're interested) Yes, please. Probably some more things are missing. So I was not able to test it. Maybe you can describe what it can, what not under Delphi? The pictures on http://open-perl-ide.sourceforge.net/#screenshots tell it i guess. And the torry download has a working executable demo. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Patch for Forms in Forms or MDI
On Mon, 03 Dec 2007 09:38:45 +0100 Guadagnini David [EMAIL PROTECTED] wrote: This patch fixes the problem that if I put a form in another it is locked. If You remember if I have two forms and write: Form2.Parent := Panel1; Form2.Align := alClient; I have form2 into the Panel1 (in Form1) but the form1 it's locked Applied. Thanks. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Patch for Forms in Forms or MDI
On Mon, 3 Dec 2007 19:52:24 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: On Mon, 03 Dec 2007 09:38:45 +0100 Guadagnini David [EMAIL PROTECTED] wrote: This patch fixes the problem that if I put a form in another it is locked. If You remember if I have two forms and write: Form2.Parent := Panel1; Form2.Align := alClient; I have form2 into the Panel1 (in Form1) but the form1 it's locked Applied. Thanks. I undid the change. It broke focusing (e.g. Find dialog in IDE). Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Patch for Forms in Forms or MDI
Mattias Gaertner schreef: On Mon, 03 Dec 2007 09:38:45 +0100 Guadagnini David [EMAIL PROTECTED] wrote: This patch fixes the problem that if I put a form in another it is locked. If You remember if I have two forms and write: Form2.Parent := Panel1; Form2.Align := alClient; I have form2 into the Panel1 (in Form1) but the form1 it's locked Applied. Thanks. This patch was also part of the patch submitted with http://www.freepascal.org/mantis/view.php?id=1052 Can this issue be closed now? Or is IncludeForm still needed? Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Patch for Forms in Forms or MDI
Mattias Gaertner schreef: On Mon, 03 Dec 2007 09:38:45 +0100 Guadagnini David [EMAIL PROTECTED] wrote: This patch fixes the problem that if I put a form in another it is locked. If You remember if I have two forms and write: Form2.Parent := Panel1; Form2.Align := alClient; I have form2 into the Panel1 (in Form1) but the form1 it's locked Applied. Thanks. Are you aware that the place of exit changed? http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/lcl/include/customform.inc?r1=13128r2=12925rev=12925root=lazarus Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] No ToolTip Symbols?
Hi all, When debugging and placing my cursor over a variable, all I get is No Symbol XXX in current context. I have: Generate Debuggin Info for GDB = checked. ToolTip symbol Tools = checked. ToolTip Expression Evaluation = checked. -- Warm Regards, Lee My wife is better at Guitar Hero than I am and it's really irritating. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Main Form retreiving data from Child Form
You can use public variables (or a private variable with the corresponding public methods for reading and writing to it, or even better a property). For simplicity, let's say that we go with the public variables. Let TMainForm be the class name of the main form. In the child form class, you could declare a public variable like: formMainReference : TMainForm and then in the main form you do a: formChild := TFormChild.Create(self); formChild.formMainReference := self; formChild.Show; the in the child form code you can do: formMainReference.editBoxInMainForm.Text := 'hello'; You can also do the other way round, but beware not to free the child before accesing the data. By the way, I never tried it, but did you notice that by creating the child form: formChild := TFormChild.Create(self); you are passing a reference of the calling form ? Any TComponent object has a Owner property, so that formChild.Owner is the main form. You only need to type cast it to a TFormMain in order to use it. .02 R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi All, I have an MDI application in which I have two forms. Form1 (Main form) and form2 (Child Form). In form 2 I have some TComboBox and TEdit Components. In the main form I have some TEdit components. I would like Form1(MainForm) TEditBox to have info from Form2(Child Form) TEditBox. I thought of two ways of doing this and would like to know if there is a better way Method 1. TIniFile. When I close form2 I write to a .ini the contents of form2. Then When I Activate Form1 (OnActivate) I read the info from .ini and fill in the info into the TEdit. Method 2. I use global variables. When I close Form2 I have global variables that store the contents of TEdit from Form2. When I go to Activate form1(OnActivate) I use the global variables and assign to the TEdit in Form1. Please let me know if there is a better way. I do not feel too good about global variables since it is a little scary and not good practise and TIniFiles are a little cubersome. Is there a better way in Lazarus. Thanks Lefti -- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] No ToolTip Symbols?
Lee Jenkins wrote: Hi all, When debugging and placing my cursor over a variable, all I get is No Symbol XXX in current context. I have: Generate Debuggin Info for GDB = checked. ToolTip symbol Tools = checked. ToolTip Expression Evaluation = checked. I should qualify this a bit more. The problem seems to be with properties of objects. Simple variables (integer, string, etc) are shown, but object properties are not: TMyObject.MyObjectStringProperty; = does not show. -- Warm Regards, Lee My wife is better at Guitar Hero than I am and it's really irritating. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
RE: [lazarus] Main Form retreiving data from Child Form
Hi R# I am not sure I follow. in my ChildForm when I declare formMainReference : TMainForm it does not know what TMainForm is since unit2 has no idea about unit1 (MainForm). Can you give me the details of what unit1(MainForm) and unit2(ChildForm) looks like since I cannot get it to work. Thanks. Best, Lefti Date: Mon, 3 Dec 2007 21:24:29 +0100 From: [EMAIL PROTECTED] To: lazarus@miraclec.com Subject: Re: [lazarus] Main Form retreiving data from Child Form You can use public variables (or a private variable with the corresponding public methods for reading and writing to it, or even better a property). For simplicity, let's say that we go with the public variables. Let TMainForm be the class name of the main form. In the child form class, you could declare a public variable like: formMainReference : TMainForm and then in the main form you do a: formChild := TFormChild.Create(self); formChild.formMainReference := self; formChild.Show; the in the child form code you can do: formMainReference.editBoxInMainForm.Text := 'hello'; You can also do the other way round, but beware not to free the child before accesing the data. By the way, I never tried it, but did you notice that by creating the child form: formChild := TFormChild.Create(self); you are passing a reference of the calling form ? Any TComponent object has a Owner property, so that formChild.Owner is the main form. You only need to type cast it to a TFormMain in order to use it. .02 R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi All, I have an MDI application in which I have two forms. Form1 (Main form) and form2 (Child Form). In form 2 I have some TComboBox and TEdit Components. In the main form I have some TEdit components. I would like Form1(MainForm) TEditBox to have info from Form2(Child Form) TEditBox. I thought of two ways of doing this and would like to know if there is a better way Method 1. TIniFile. When I close form2 I write to a .ini the contents of form2. Then When I Activate Form1 (OnActivate) I read the info from .ini and fill in the info into the TEdit. Method 2. I use global variables. When I close Form2 I have global variables that store the contents of TEdit from Form2. When I go to Activate form1(OnActivate) I use the global variables and assign to the TEdit in Form1. Please let me know if there is a better way. I do not feel too good about global variables since it is a little scary and not good practise and TIniFiles are a little cubersome. Is there a better way in Lazarus. Thanks Lefti-- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Main Form retreiving data from Child Form
yeah, add unit1 in the uses clause of unit2 and add unit2 in the uses clause of unit1. R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi R# I am not sure I follow. in my ChildForm when I declare formMainReference : TMainForm it does not know what TMainForm is since unit2 has no idea about unit1 (MainForm). Can you give me the details of what unit1(MainForm) and unit2(ChildForm) looks like since I cannot get it to work. Thanks. Best, Lefti Date: Mon, 3 Dec 2007 21:24:29 +0100 From: [EMAIL PROTECTED] To: lazarus@miraclec.com Subject: Re: [lazarus] Main Form retreiving data from Child Form You can use public variables (or a private variable with the corresponding public methods for reading and writing to it, or even better a property). For simplicity, let's say that we go with the public variables. Let TMainForm be the class name of the main form. In the child form class, you could declare a public variable like: formMainReference : TMainForm and then in the main form you do a: formChild := TFormChild.Create(self); formChild.formMainReference := self; formChild.Show; the in the child form code you can do: formMainReference.editBoxInMainForm.Text := 'hello'; You can also do the other way round, but beware not to free the child before accesing the data. By the way, I never tried it, but did you notice that by creating the child form: formChild := TFormChild.Create(self); you are passing a reference of the calling form ? Any TComponent object has a Owner property, so that formChild.Owner is the main form. You only need to type cast it to a TFormMain in order to use it. .02 R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi All, I have an MDI application in which I have two forms. Form1 (Main form) and form2 (Child Form). In form 2 I have some TComboBox and TEdit Components. In the main form I have some TEdit components. I would like Form1(MainForm) TEditBox to have info from Form2(Child Form) TEditBox. I thought of two ways of doing this and would like to know if there is a better way Method 1. TIniFile. When I close form2 I write to a .ini the contents of form2. Then When I Activate Form1 (OnActivate) I read the info from .ini and fill in the info into the TEdit. Method 2. I use global variables. When I close Form2 I have global variables that store the contents of TEdit from Form2. When I go to Activate form1(OnActivate) I use the global variables and assign to the TEdit in Form1. Please let me know if there is a better way. I do not feel too good about global variables since it is a little scary and not good practise and TIniFiles are a little cubersome. Is there a better way in Lazarus. Thanks Lefti -- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
RE: [lazarus] Main Form retreiving data from Child Form
Hi R, Can you do this. I get an error Circular unit reference to unit1 Thanks Lefti Date: Mon, 3 Dec 2007 21:52:08 +0100 From: [EMAIL PROTECTED] To: lazarus@miraclec.com Subject: Re: [lazarus] Main Form retreiving data from Child Form yeah, add unit1 in the uses clause of unit2 and add unit2 in the uses clause of unit1. R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi R# I am not sure I follow. in my ChildForm when I declare formMainReference : TMainForm it does not know what TMainForm is since unit2 has no idea about unit1 (MainForm). Can you give me the details of what unit1(MainForm) and unit2(ChildForm) looks like since I cannot get it to work. Thanks. Best, LeftiDate: Mon, 3 Dec 2007 21:24:29 +0100 From: [EMAIL PROTECTED] To: lazarus@miraclec.com Subject: Re: [lazarus] Main Form retreiving data from Child Form You can use public variables (or a private variable with the corresponding public methods for reading and writing to it, or even better a property). For simplicity, let's say that we go with the public variables. Let TMainForm be the class name of the main form. In the child form class, you could declare a public variable like: formMainReference : TMainForm and then in the main form you do a: formChild := TFormChild.Create(self); formChild.formMainReference := self; formChild.Show; the in the child form code you can do: formMainReference.editBoxInMainForm.Text := 'hello'; You can also do the other way round, but beware not to free the child before accesing the data. By the way, I never tried it, but did you notice that by creating the child form: formChild := TFormChild.Create(self); you are passing a reference of the calling form ? Any TComponent object has a Owner property, so that formChild.Owner is the main form. You only need to type cast it to a TFormMain in order to use it. .02 R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi All,I have an MDI application in which I have two forms. Form1 (Main form) andform2 (Child Form). In form 2 I have some TComboBox and TEdit Components. Inthe main form I have some TEdit components. I would like Form1(MainForm)TEditBox to have info from Form2(Child Form) TEditBox. I thought of two waysof doing this and would like to know if there is a better way Method 1. TIniFile. When I close form2 I write to a .ini the contents ofform2. Then When I Activate Form1 (OnActivate) I read the info from .ini andfill in the info into the TEdit. Method 2. I use global variables. When I close Form2 I have globalvariables that store the contents of TEdit from Form2. When I go to Activateform1(OnActivate) I use the global variables and assign to the TEdit inForm1. Please let me know if there is a better way. I do not feel too good aboutglobal variables since it is a little scary and not good practise andTIniFiles are a little cubersome. Is there a better way in Lazarus. Thanks Lefti -- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
RE: [lazarus] Main Form retreiving data from Child Form
Hi R, Can you do this. I get an error Circular unit reference to unit1 Thanks Lefti Date: Mon, 3 Dec 2007 21:52:08 +0100 From: [EMAIL PROTECTED] To: lazarus@miraclec.com Subject: Re: [lazarus] Main Form retreiving data from Child Form yeah, add unit1 in the uses clause of unit2 and add unit2 in the uses clause of unit1. R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi R# I am not sure I follow. in my ChildForm when I declare formMainReference : TMainForm it does not know what TMainForm is since unit2 has no idea about unit1 (MainForm). Can you give me the details of what unit1(MainForm) and unit2(ChildForm) looks like since I cannot get it to work. Thanks. Best, LeftiDate: Mon, 3 Dec 2007 21:24:29 +0100 From: [EMAIL PROTECTED] To: lazarus@miraclec.com Subject: Re: [lazarus] Main Form retreiving data from Child Form You can use public variables (or a private variable with the corresponding public methods for reading and writing to it, or even better a property). For simplicity, let's say that we go with the public variables. Let TMainForm be the class name of the main form. In the child form class, you could declare a public variable like: formMainReference : TMainForm and then in the main form you do a: formChild := TFormChild.Create(self); formChild.formMainReference := self; formChild.Show; the in the child form code you can do: formMainReference.editBoxInMainForm.Text := 'hello'; You can also do the other way round, but beware not to free the child before accesing the data. By the way, I never tried it, but did you notice that by creating the child form: formChild := TFormChild.Create(self); you are passing a reference of the calling form ? Any TComponent object has a Owner property, so that formChild.Owner is the main form. You only need to type cast it to a TFormMain in order to use it. .02 R# 2007/12/3, el stamatakos [EMAIL PROTECTED]: Hi All,I have an MDI application in which I have two forms. Form1 (Main form) andform2 (Child Form). In form 2 I have some TComboBox and TEdit Components. Inthe main form I have some TEdit components. I would like Form1(MainForm)TEditBox to have info from Form2(Child Form) TEditBox. I thought of two waysof doing this and would like to know if there is a better way Method 1. TIniFile. When I close form2 I write to a .ini the contents ofform2. Then When I Activate Form1 (OnActivate) I read the info from .ini andfill in the info into the TEdit. Method 2. I use global variables. When I close Form2 I have globalvariables that store the contents of TEdit from Form2. When I go to Activateform1(OnActivate) I use the global variables and assign to the TEdit inForm1. Please let me know if there is a better way. I do not feel too good aboutglobal variables since it is a little scary and not good practise andTIniFiles are a little cubersome. Is there a better way in Lazarus. Thanks Lefti -- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- -- Ing. Roberto Padovani via Mandrioli, 1 40061 Minerbio (BO) Italy mail: [EMAIL PROTECTED] cell: 340-3428685 - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Fatal: Can't find unit *** used by Lazarus when build lazarus with my own package
On Sun, 2 Dec 2007 21:43:16 -0600 Jesus Reyes A. [EMAIL PROTECTED] wrote: - Original Message - From: Mattias Gaertner [EMAIL PROTECTED] To: lazarus@miraclec.com Sent: Sunday, December 02, 2007 4:29 PM Subject: Re: [lazarus] Fatal: Can't find unit *** used by Lazarus when build lazarus with my own package On Sun, 02 Dec 2007 11:17:58 -0300 Osvaldo TC Filho [EMAIL PROTECTED] wrote: The ide do not insert the new packages and units (in project file) automatically. I have to go in project inspector and add packages manually. The IDE adds the package when you add one of its components to a form of the project. Yes, but this is currently broken, see http://www.freepascal.org/mantis/view.php?id=10234 Fixed. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Patch for Forms in Forms or MDI
On Mon, 03 Dec 2007 20:16:44 +0100 Vincent Snijders [EMAIL PROTECTED] wrote: Mattias Gaertner schreef: On Mon, 03 Dec 2007 09:38:45 +0100 Guadagnini David [EMAIL PROTECTED] wrote: This patch fixes the problem that if I put a form in another it is locked. If You remember if I have two forms and write: Form2.Parent := Panel1; Form2.Align := alClient; I have form2 into the Panel1 (in Form1) but the form1 it's locked Applied. Thanks. Are you aware that the place of exit changed? http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/lcl/include/customform.inc?r1=13128r2=12925rev=12925root=lazarus I changed the following: - Child forms no longer call LCLIntf.SetFocus. - ActiveControl is now updated for parent forms for consistency - If ActiveControl=nil then a default is chosen to get the same focus on all widgetsets. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Main Form retreiving data from Child Form
el stamatakos wrote: Hi R, Can you do this. I get an error "Circular unit reference to unit1" Thanks Lefti Date: Mon, 3 Dec 2007 21:52:08 +0100 From: [EMAIL PROTECTED] To: lazarus@miraclec.com Subject: Re: [lazarus] Main Form retreiving data from Child Form yeah, add unit1 in the "uses" clause of unit2 and add unit2 in the "uses" clause of unit1. You need to put them in the implementation section not the interface section. (You may well need to create a uses clause under implementation, as there isn't one there by default.) You can then access the other units from methods in the implementation section, without the circular reference error. cheers, John Sunderland _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLite 3 datetime and timestamp
Luca Olivetti wrote: En/na Roberto Padovani ha escrit: When the project I'm working on is finished, I'll strip everything from the source code and only leave a detailed tutorial for using sqlite without visual components. FWIW to do that you can also use sqlite3 directly (or with a thin wrapper), you don't have the convenience of a full dataset descendant but you have complete control on what you get from the database. BTW: I wrote a thin wrapper to sqlite3. See https://luipack.bountysource.com/svn/!tree/185#svn0_4|svn0_4_9 Is not in a release state yet. I'll release together with the documentation. Luiz _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on Fedora 8
C Western wrote: The switch from Fedora 7 to 8 seems to have revealed some problems. The same lazarus executable looks fine on 7, but on 8 has two issues: 1. The font used for menus and dialog boxes is now a rather larger font (?Arial) and is clearly not using the gtk2 theme settings. I suspect this is because the gtk1 theme info is no longer installed but I can't identify the appropriate files. Any ideas? 2. The font used for displaying source code looks rather worse - it does not show reserved words in bold, for example. Changing the font via the environment options does not seem to help. Has anybody else had this problem? And the answer (for future reference) is that 75dpi fonts needed to be manually installed. The version 7 install had both 75 dpi and 100 dpi fonts automatically, but version 8 (on two different systems) only installed the 100 dpi fonts. The reduced selection seems to have defeated the default gtk1 theme, and given a reduced choice of fonts for LCL. Colin Western _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLite 3 datetime and timestamp
Roberto Padovani wrote: Now, about assumptions. in sqlite3ds there is the assumption that BOOLEAN fields are stored as 1 or 0. In fact, to recover a db that had TRUE and FALSE, I made a new class where I changed ftBool to fString. In this way I could read them, parse them and then write them back as 1 or 0. With the dates, the problem is similar, because sqlite3ds understands that the field is of type DATE, and so it makes the following assumption in customsqliteds.pas line 603: ftFloat,ftDateTime,ftTime,ftDate,ftCurrency: begin Val(StrPas(FieldRow),Double(Buffer^),ValError); Result:= ValError = 0; end; True. It stores both in memory and in database the Double value. In the database I have, the dates are in the ISO standard form 2007-12-03 12:11:10.1234 How do you suggest me to handle with them ? 1) by complicating the SQL queries with SELECT date(field_name) as field_name FROM... which turns the field_name into a string in the result set Possible 2) by subclassing or anyway changing the TFieldType ? Difficult 3) like with boolean, by making a special temporary class that parses the whole database (not so big) and changes the dates into Freepascal-style doubles (are they stored more efficiently ?) I already started such tool. Not ready yet. Good if is one step eg you won't access that file every time. 4) other (please specify :-)) Modify the sqlite3ds or create a TSqlite3Dataset descendant that: 1) Recognize a TIMESTAMP field 2) Stores the field value as a string in the desired format 3) When the data is loaded convert from string to double 4) When do ApplyUpdates convert from Double to String I can do that. My brain-storming last night came up with the idea of adding a flag that says force every field as a string: this would let someone who doesn't know which convention was used in which field to inspect it. Is it somewhat crazy ? It's more difficult than above, but possible. By the way, I really like sqlite and the unit you made to access it. Good When the project I'm working on is finished, I'll strip everything from the source code and only leave a detailed tutorial for using sqlite without visual components. Good. Meanwhile, I read somewhere in the mailing that you are writing a documentation for sqlite3ds; is it ready or partially ready ? Partially ready. This is really needed because there's a lot of undocumented features and some feature misuses (like using QuickQuery for execute a SQL) I'll be busy until 15/12. After that i will work on a solution for this case, finish the documentation, work in improvements in sqliteds and release a new sqlite3 wrapper. I'll contact you. I'm studying the whole code at the moment and some documentation would help a lot, especially to see the global structure, to get the large picture of it. Moreover, I'm going to keep on working a lot with sqlite, so if some contribution is needed somewhere, let me know. Fine. The documentation is a place that needs work. Luiz _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] returning empty published property from component
Hi, what is the convention for returning unset published properties when making a component? For numerical values it is 0 or eventually a default value, but how about strings? Should an empty string be returned or a NIL pointer? I'm mostly thinking of property editors and the object inspector here. TIA, Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] FPC unit in Lazarus
Awhile ago I found that the following 2nd line (C:\lazarus\fpc\2.2.1\source\rtl\objpas\fmtbcd.pas) causes problems when using database access units in a dll. (note the space at front of line) {$r+,q+,s+} { $r-,q-,s-} Removing the space fixes the problem for me, though may cause others yet unknown. Question 1 - How would I determine if this has been fixed without downloading a full snapshot ?. I can use the WebSvn interface to check Lazarus source, but not the fpc used by Lazarus (which I am assuming to be different to the current FPC source - patches etc). Question 2 - How could I fix this for myself ? I have the latest svn from FPC, compiled ok - but how do I use this with Lazarus? - paths etc are all different - and will this negate any Laz specific patches applied by the Laz developers ? If this is already covered in a wiki or similar - sorry - please point me to the link. Thanks - SteveG _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] SOAP DateTime
Hi guys, I'm busy writing a SOAP client, and I'm a little stuck formatting a datetime to be SOAP compatible. What SHOULD a SOAP datetime string look like ? Is there a function to produce one from a TDateTime ? I tried to write a simple FormateDateTime function to do it, but I must have a detail wrong because I keep getting http-400 (bad request) errors. Here is a sample generated by my current code: FromDateTime2007-12-03T15:10:45.000Z/FromDateTime Does anybody know how it should be changed ? A.J. PS. The Z I found in a website sample which I used to generate this much... what does it mean ? -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 11 252 9197 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives