Re: [lazarus] Philip Hess' Carbon IDE WIKI idea
Hess, Philip J wrote: All Mac GUI apps should have an .app bundle. Here's how I created one for the Carbon-based Laz IDE: An .app bundle isn't an absolute requirement, it suffices to add a to 'carb' resourse to the executable, e.g. through a carb.r file that gets compiled with /Developer/Tools/Rez #include Carbon/Carbon.r type 'carb' { }; resource 'carb'(0) { }; To make it nicer, you can add a 'plst' resource Read 'plst' (0) Info.plist; Regards, Adriaan van Os _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLdb : get last_inserted_id
Hi... this is the complete code I'm using to extract the last_insert_id from the table TABLE1, but it still don't works. Infact I get always 0 from the variable id_ingresso, pheraphs in the database the row is correctly inserted. Maybe it's a bug of the component? This is the structure of the table: CREATE TABLE `TABLE1` ( `PK_TABLE1` integer (11) UNSIGNED NOT NULL AUTO_INCREMENT , `FIELD1`varchar (20), `FIELD2`varchar (20), `FIELD3`datetime NOT NULL, PRIMARY KEY (`PK_TABLE1`) ) TYPE=MyISAM This is the code: procedure TPassaggioGestito.RegistraPassaggioSulDB(Connessione: TSQLConnection); var Qry: TSQLQuery; Trans: TSQLTransaction; begin //parametri db per query Trans:=TSQLTransaction.Create(nil); Qry:=TSQLQuery.Create(nil); try Connessione.Transaction := Trans; Qry.DataBase := Connessione; Qry.Transaction := Trans; Connessione.StartTransaction; Qry.ParseSQL := true; Qry.ReadOnly := false; Qry.Active := false; Qry.SQL.Text := 'INSERT INTO TABLE1 '+ '(FIELD1, FIELD2, FIELD3) '+ 'VALUES '+ '(:FIELD1, :FIELD2, :FIELD3) '; Qry.Params.ParamByName('FIELD1').AsString := self.field1; Qry.Params.ParamByName('FIELD2').AsString := self.field2; Qry.Params.ParamByName('FIELD3').AsDateTime := self.field3; try Qry.ExecSQL; except Log.Scrivi(0,'Errore SQL in passaggigestiti: SQL = '+qry.SQL.Text+''); end; //la query viene ora usata in lettura Qry.Active := false; qry.ParseSQL := false; qry.ReadOnly := true; //leggo il pk_ingresso appena inserito Qry.SQL.Text := 'SELECT LAST_INSERT_ID() as PRIMARY_KEY'; try Qry.open; self.id_ingresso := Qry.FieldByName('PRIMARY_KEY').AsInteger; Qry.close; except Log.Scrivi(0,'Errore SQL in passaggigestiti: SQL = '+Qry.SQL.Text+''); self.id_ingresso := -1; end; finally Connessione.EndTransaction; Qry.Free; Trans.Free; end; end; _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] LCL-fpGUI interface
Some good news... Thanks to Andrew Haines for pointing out the issue, as of fpGUI's svn revision 408, the TButton, TEdit, TCheckbox, TRadioButton and TForm now display correctly using the LCL-fpGUI toolkit. It's a start! :-) 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] ListView Crashes on Mac OS X...
Tom is right. Almost everything is implemented and working with the Carbon widgetset. I tried on Saturday on PPC with 2.2, and it I got the fpc dir not found [ignore] dialog. Pressing the button yielded a reaction on the console, but the program hung. It would be *very* nice if we could show a Lazarus/Carbon on the Systems 2005 fair next weekend, and I'm taking the Mini, so it could be possible. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Cursor in editor disappears
Hi, I got a Lazarus svn update today. Now my cursor disappears randomly in the editor! I can still type and move the cursor, by I cannot see it. The only way I found to get it back is to restart Lazarus. I'm using Lazarus v0.9.23 r12473M i386-linux-gtk 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] LCL-fpGUI interface
Graeme Geldenhuys ha scritto: Some good news... Thanks to Andrew Haines for pointing out the issue, as of fpGUI's svn revision 408, the TButton, TEdit, TCheckbox, TRadioButton and TForm now display correctly using the LCL-fpGUI toolkit. It's a start! :-) What's the procedure to play with fpgui? Thanks, Giuliano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] LCL-fpGUI interface
On 15/10/2007, Giuliano Colla [EMAIL PROTECTED] wrote: What's the procedure to play with fpgui? Their's not much to play with at the moment using the LCL-fpGUI interface. So far it only displays the select few components and a Button's OnClick can be set. :) There is a readme file in the lcl/interfaces/fpgui directory that explains the process, but I need to update that file to reflect the new paths. In a nutshell. 1. You need the latest svn Lazarus. The previous release will not work. 2. You need to get the latest fpGUI from svn. See the url in my signature for instructions on where to get it from. 3. Copy (under Windows/Linux) or SymLink (under Linux) the fpGUI/src/corelib and fpGUI/src/gui to the lazarus/lcl/interfaces/fpgui directory 4. Recompile the LCL only, using the fpGUI toolkit 5. Create a new project and select 'fpGUI' as the toolkit in the Project Compiler Options dialog. Only the select few components mentioned earlier can be used for now with LCL-fpGUI interface. 6. Compile and run your test app. BTW: Patches for LCL-fpGUI are more than welcome! ;-) 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
[lazarus] i18n Question
We're using FOnReadStringProperty from reader.inc to translate the string properties, how about TStrings how can this be done? Ideas please. Regards, Luís _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TRegistry crash on Mac OS X
Tom Gregorovic wrote: I have just tested it and it works well for me. The TRegistry should be saved to reg.xml file in the same dir as the executable. Please create a bug report with further description. On Mac OS X, the reg.xml file is saved to the root directory, but on some user's machines this fails and causes an AV due to security rights issues. It seems that instead of saving to in the same directory as the application it may be better to save it to the user's home directory or similar under Unix based system as that is then more likely to have some sort of write access. Dominique. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Enumerating Fonts on Mac OS X...
Thanks Phillip, That works nicely. I'm doing a straight port for a client, so will leave it as a TComboBox for now and will see if they complain. Dominique. Hess, Philip J wrote: Something like this should work with all widgetsets: for i := 0 to Pred(Screen.Fonts.Count) do ComboBox1.Items.Add(Screen.Fonts[i]); Because of the large number of fonts available on OS X, you might want to use a TListBox instead of a TComboBox. Thanks. -Phil -Original Message- From: Dominique Louis [mailto:[EMAIL PROTECTED] Sent: Sun 10/14/2007 2:02 PM To: lazarus@miraclec.com Subject: [lazarus] Enumerating Fonts on Mac OS X... Hi all, What is the easier way to get the list of Fonts currently installed on a Mac OS X system. I'd like to populate a Combobox with the Fonts currently installed on the system. Dominique. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] i18n Question
On Mon, 15 Oct 2007 16:28:23 +0100 Luis Rodrigues [EMAIL PROTECTED] wrote: We're using FOnReadStringProperty from reader.inc to translate the string properties, how about TStrings how can this be done? Ideas please. First define requirements: - Some TStrings should not be translated - Some TStrings should be translated line by line (TCombobox, TListBox) - Some TStrings should be translated as text (TMemo) To FPC team: Is it possible to use TTranslateStrings = type TStrings? I ask because, the compiler allows it, but stops later with a not helping message: lcl/interfaces/gtk2/interfaces.pas(1,1) Fatal: Compilation aborted Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] beginners questions on handling lazarus
Hi, since I'm not a very frequently user of lazarus I have some questions the FAQ could not answer: 1. Is it possible to build lazarus with my custom list of installed components from the command line? 2. I installed the Interbase support (Okay, my laz version is pretty old ;) and there is no TTable, only transaction, database and query components. Is it meant to be that way? 3. When compiling the IDE from it's GUI some settings have to be done in the 'Project - Settings' dialog, namely the location of libgds.so. That is irritating, I thought the project settings are only for the loaded source project. How can settings belonging to the component library and IDE be discriminated from the settings for the project I'm working at? (4.) More about svn, but maybe: If I want to check out version 0.9.23, how do I tell svn not knowing the svn revision number? TIA, Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] beginners questions on handling lazarus
On Tue, 16 Oct 2007 01:10:08 +0200 Marc Santhoff [EMAIL PROTECTED] wrote: Hi, since I'm not a very frequently user of lazarus I have some questions the FAQ could not answer: 1. Is it possible to build lazarus with my custom list of installed components from the command line? See here http://wiki.lazarus.freepascal.org/Install_IDE_packages_without_the_IDE 2. I installed the Interbase support (Okay, my laz version is pretty old ;) and there is no TTable, only transaction, database and query components. Is it meant to be that way? Yes. See here http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial You should consider updating your lazarus/fpc, because some database bugs were fixed, new features were added and lazarus has now the lazdatadesktop tool. 3. When compiling the IDE from it's GUI some settings have to be done in the 'Project - Settings' dialog, namely the location of libgds.so. That is irritating, I thought the project settings are only for the loaded source project. How can settings belonging to the component library and IDE be discriminated from the settings for the project I'm working at? I don't know, what you mean with 'Project - Settings' dialog. Library paths can be set in /etc/fpc.cfg (under non windows, I don't know, where this file is stored under windows, just search for fpc.cfg). If you want to add the lib path only for one specific project you can set the lib path in the Project - Compiler Options. But beware, this will only work on your machine, so the best place is /etc/fpc.cfg. (4.) More about svn, but maybe: If I want to check out version 0.9.23, how do I tell svn not knowing the svn revision number? If you mean the latest development version, simply omit the revision number. Under Linux you can simply use: svn up. This might help http://wiki.lazarus.freepascal.org/Getting_Lazarus Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] beginners questions on handling lazarus
Am Dienstag, den 16.10.2007, 01:53 +0200 schrieb Mattias Gaertner: On Tue, 16 Oct 2007 01:10:08 +0200 Marc Santhoff [EMAIL PROTECTED] wrote: Hi, since I'm not a very frequently user of lazarus I have some questions the FAQ could not answer: 1. Is it possible to build lazarus with my custom list of installed components from the command line? See here http://wiki.lazarus.freepascal.org/Install_IDE_packages_without_the_IDE Okay. 2. I installed the Interbase support (Okay, my laz version is pretty old ;) and there is no TTable, only transaction, database and query components. Is it meant to be that way? Yes. See here http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial You should consider updating your lazarus/fpc, because some database bugs were fixed, new features were added and lazarus has now the lazdatadesktop tool. I will (see question 4). I only asked because i read an old book about Delphi 3 for remembering how database access works. But since a table held by a sql server is a generalization of a query (select * from table) that fine with me. 3. When compiling the IDE from it's GUI some settings have to be done in the 'Project - Settings' dialog, namely the location of libgds.so. That is irritating, I thought the project settings are only for the loaded source project. How can settings belonging to the component library and IDE be discriminated from the settings for the project I'm working at? I don't know, what you mean with 'Project - Settings' dialog. Library paths can be set in /etc/fpc.cfg (under non windows, I don't know, where this file is stored under windows, just search for fpc.cfg). If you want to add the lib path only for one specific project you can set the lib path in the Project - Compiler Options. But beware, this will only work on your machine, so the best place is /etc/fpc.cfg. I tried to recompile the IDE when installing the interbase components. An exception message told me to ad the path where to search for the library. But you're right, fpc.cfg is a more general solution. (4.) More about svn, but maybe: If I want to check out version 0.9.23, how do I tell svn not knowing the svn revision number? If you mean the latest development version, simply omit the revision number. Under Linux you can simply use: svn up. This might help http://wiki.lazarus.freepascal.org/Getting_Lazarus Getting HEAD or trunk is no problem, but I have to support FreeBSD 4 and thus fpc 2.0.4 for a while. This requirement leads to checking out the last version of lazarus compilable and working flawlessly with this version of fpc. If someone could tell me the svn revision for lazarus 0.9.23 this would do (I think). Many thanks, Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLdb : get last_inserted_id
Alvise Nicoletti wrote: Hi... this is the complete code I'm using to extract the last_insert_id from the table TABLE1, but it still don't works. Infact I get always 0 from the variable id_ingresso, pheraphs in the database the row is correctly inserted. Hi Alvise, I haven't gone through you example completely, but try doing the same thing by generating the sql text on the fly instead of using parameters. I was unable to get anything to work using parameters when I last tried a few months ago. cheers, John _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] beginners questions on handling lazarus
Marc Santhoff wrote: Getting HEAD or trunk is no problem, but I have to support FreeBSD 4 and thus fpc 2.0.4 for a while. This requirement leads to checking out the last version of lazarus compilable and working flawlessly with this version of fpc. If someone could tell me the svn revision for lazarus 0.9.23 this would do (I think). Lazarus 0.9.24 will be (and ofcource 0.9.23 is) compilable with fpc 2.0.4. So you can get trunk. Lazarus support for 2.0.4 will be stoped with fpc 2.2.2 (as I think). Best regards, Paul Ishenin _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] beginners questions on handling lazarus
Am Dienstag, den 16.10.2007, 08:43 +0800 schrieb Paul Ishenin: Marc Santhoff wrote: Getting HEAD or trunk is no problem, but I have to support FreeBSD 4 and thus fpc 2.0.4 for a while. This requirement leads to checking out the last version of lazarus compilable and working flawlessly with this version of fpc. If someone could tell me the svn revision for lazarus 0.9.23 this would do (I think). Lazarus 0.9.24 will be (and ofcource 0.9.23 is) compilable with fpc 2.0.4. So you can get trunk. Lazarus support for 2.0.4 will be stoped with fpc 2.2.2 (as I think). Very nice, you're right. :) Thanks, Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] beginners questions on handling lazarus
Paul Ishenin schreef: Marc Santhoff wrote: Getting HEAD or trunk is no problem, but I have to support FreeBSD 4 and thus fpc 2.0.4 for a while. This requirement leads to checking out the last version of lazarus compilable and working flawlessly with this version of fpc. If someone could tell me the svn revision for lazarus 0.9.23 this would do (I think). There is no svn revision for 0.9.23: http://wiki.lazarus.freepascal.org/Version_Numbering Lazarus 0.9.24 will be (and ofcource 0.9.23 is) compilable with fpc 2.0.4. So you can get trunk. Lazarus support for 2.0.4 will be stoped with fpc 2.2.2 (as I think). This is only true for darwin, other platforms may stop working earlier and windows already stopped support for fpc 2.0.4. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Philip Hess' Carbon IDE WIKI idea
Philip, I believe the carb resource has been deprecated for years. Are you kidding, any Apple technology older than three months is deprecated. I stand by my statement that all OS X GUI apps should have an .app bundle. It's just too good of an idea and almost all developers recognize that, as evidenced by all the apps that use bundles. Well, you should really be programming in Objective-C. Didn't you know that Pascal is a very old-fashioned language, once designed for teaching on nowadays only suitable for kids and loosers ? After twenty years of Mac programming, I really can't take Apple recommendations serious anymore. I remember too many thou should's from the past. Regards, Adriaan van Os _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives