Re: Sound in Lazarus applications
On Jan 16, 2008 10:38 AM, Adrian Maier [EMAIL PROTECTED] wrote: Hello , Did anyone integrate sound capabilities into a Lazarus application ? (in a cross-platform way :-D ) I'm thinking about having the ability to play sounds when certain certain actions are done by the user or when to play back work complete after a long running task finishes. Thank you guys for the links. I hope to find time for research in the weekend , probably . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Sound in Lazarus applications
Hello , Did anyone integrate sound capabilities into a Lazarus application ? (in a cross-platform way :-D ) I'm thinking about having the ability to play sounds when certain certain actions are done by the user or when to play back work complete after a long running task finishes. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] google android contest
On Jan 10, 2008 7:36 AM, willem [EMAIL PROTECTED] wrote: I want to participate in the google android contest. I want to argue to google that the lazarus object pascal platform is a better choice than Java. Hello, It's unclear what are you trying to accomplish : to convince google that they should switch to pascal from the already available java-based API and SDK ? This won't happen ... Or to convince them to accept into the contest projects that are written in other languages ? Is this currently possible ? Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] google android contest
On Jan 10, 2008 11:36 AM, willem [EMAIL PROTECTED] wrote: I want google to convince them to accept a contest project thats is written in Free Pascal. Therefore I did make a Wiki at www.android-google.tk. There is this phrase that I don't understand in your wiki page: My first idea is to use also the Lazarus object pascal IDE. In the Article about Language benchmarks you can see that Free Pascal is the number ONE compiler for Android ! But that page (http://83.87.29.72/tikiwiki-1.9.9ga/tiki-index.php?page=benchmarks) is an article about benchmarks in general with some lists of benchmarks. It contains no direct reference to FreePascal or Android ! I am not familiar with porting FreePascal to other platforms /opertaing systems, but I doubt that it is possible to create a Lazarus application in just a few months. This is the architecture of the Android OS : http://code.google.com/android/what-is-android.html - the red part is the Linux kernel - in green we have some C/C++ libraries (including libc) - the blue components are java It is probably possible to have a FPC program that runs on top of the Linux kernel and uses those green C/C++ libraries. But unless I'm wrong about this , a FPC program can't use any of those Java libraries directly . In order to have a real android application that is truly integrated with the other android applications you'd need to re-implement in pascal much of the functionality of the Application Framework. The bad thing is that you can't be sure about what libraries you can build on : the android applications are supposed to use the java API , so the underlying C/C++ libraries can be changed without notice . So, I don't think it's possible to have a functional application finished for the March contest. Not to mention that the android emulator is most likely a desktop implementation of the android java API : so probably it's impossible to actually run any non-java applications at this time . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] google android contest
On Jan 10, 2008 1:03 PM, Adrian Maier [EMAIL PROTECTED] wrote: Not to mention that the android emulator is most likely a desktop implementation of the android java API : so probably it's impossible to actually run any non-java applications at this time . Sorry about the incorrect assumption above: the android emulator is apparently using qemu , therefore it contains the entire operating system. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Unable to build the current Lazarus with fpc 2.0.4
On Nov 16, 2007 9:14 PM, Mattias Gaertner [EMAIL PROTECTED] wrote: I disabled FakeMethods for 2.0.x. Everything is fine after this fix. Thanks Mattias ! -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Unable to build the current Lazarus with fpc 2.0.4
Hello, I'm getting the following error when trying to build the latest (svn) Lazarus : Free Pascal Compiler version 2.0.4 [2006/08/20] for i386 Copyright (c) 1993-2006 by Florian Klaempfl Target OS: Linux for i386 Compiling lazarus.pp Compiling main.pp Compiling /stuff/am/src/lazarus/designer/designer.pp Compiling customformeditor.pp customformeditor.pp(1285,38) Error: identifier idents no member PropertyPath customformeditor.pp(2291) Fatal: There were 1 errors compiling module, stopping customformeditor.pp(74,12) Fatal: Compilation aborted make[2]: *** [lazarus] Error 1 make[2]: Leaving directory `/stuff/am/src/lazarus/ide' make[1]: *** [ide] Error 2 make[1]: Leaving directory `/stuff/am/src/lazarus/ide' make: *** [ide] Error 2 Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Object Pascal (Delphi Lazarus) developers are spoilt
On Nov 9, 2007 7:27 AM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, It's just amazing how many cool features we have in the compilers and especially the IDE's. The biggest _cool_ feature is the jumping between Interface and Implementation sections for a method (Ctrl+Shift+Up/Down). Anybody done this before? How complicated would the code parsing be to enable something like that. Note: I've never written a pascal code parser before. All I'm interested in is the jumping feature, no syntax highlighting etc... But then again, if the FPC's text IDE supports that, my problem is solved. If it doesn't, maybe I can implement it in their instead. Hello Graeme , Any editor that knows how to handle ctags (vim,emacs,probably others) should be able to provide this jumping as long as you provide a 'tags' file in the directory where you are editing the sources. I have done a quick test and ran : ctags *.pas which has successfully generated the tags file for all the pascal files in the current directory. I've opened the pas with vim, and i can go on a procedure call and press ctrl+] which jumps to the definition of that procedure. Ctrl+T jumps back . In my case the procedure was defined in the same source file, but there is no reason for this mechanism not to work with functions defined in another file. The version of ctags that i've used is : Exuberant Ctags 5.5.4 (http://ctags.sourceforge.net/) Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Object Pascal (Delphi Lazarus) developers are spoilt
On Nov 9, 2007 12:28 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: On 09/11/2007, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Thanks Adrian. Up 'till now I never even knew about ctags! :-) I just tried that but can't seem to get vim to do the jump? Ah, I think I got it. It can jump from the implementation section to the interface section, but not other way round (as the first jump). Still very handy, thanks! I'm glad it helps. I've never used ctags with Pascal, only with C/C++ sources . Since ctags is something created initially for c it's possible that parsing pascal is not perfect. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] The reliability of this mailing list
On 10/20/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote: On 19/10/2007, Adrian Maier [EMAIL PROTECTED] wrote: How reliably does the lazarus@miraclec.com mailing list work? A few days ago i've posted a question that was re-sent quickly to everybody , and also received some good answers very quickly. I've had myself randomly unsubscribed from the mailing list. Though in that case, I would have thought the mailing list 'server' would reply and say I am not allowed to send messages, but it never does that. To this day, if I don't get a response within about 2-3 days, I check on GMANE to see if the message actually got through. Lately it's been working fine for me again. It's a good idea to verify the message with Gmane. It looks like i am still subscribed, but my original question didn't make it through the list. Also, it looks like sometimes i'm receiving messages in batches : the last 9-10 threads arrived during this night all , after at least one day with no list activity. However, yesterday i've posted another question which didn't appear yet. Do each posting need to be accepted manually by a moderator ?! As far as I know, only HTML messages get moderated. So the bottom line, *always* send emails in plain text! :-) You get the same message across, it's smaller in size and everybody can read it. I prefer text emails as well :) Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] The reliability of this mailing list
Hello, How reliably does the lazarus@miraclec.com mailing list work? A few days ago i've posted a question that was re-sent quickly to everybody , and also received some good answers very quickly. However, yesterday i've posted another question which didn't appear yet. Do each posting need to be accepted manually by a moderator ?! Or the spam filters are sometimes too hungry ? I'm curious to see when this posting appears on the list ... Thanks, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Custom editing of a TStringGrid cell (with PickList)
Hello, I'm looking for ideas for making a TSringGrid behave exactly the way i like . One of the columns ('Category') has a short list of pre-defined values , so i've set the buttonStyle of that column to cbsPickList and defined a select editor event handler: procedure TTrackTimeMainForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow: Integer; var Editor: TWinControl); begin case aCol of 0: {category} begin Editor:=PickListCategories; end; 1,2,3: Editor:=StringGrid1.EditorByStyle(cbsAuto); end; {case} end; My problem with this approaches is that i need three clicks: - one for selecting the cell - one for getting into the editing mode - one for clicking the small button that opens the pickList This is horrible for the user, even if it's an application for my own use. How could I display the list of possible values with just one click ? I realize that it must be possible to use the grid's OnClick , but maybe there is some better/simpler solution that I'm not aware of . PS: i'm on Linux using the fpc 2.0.4 , latest svn Lazarus and the gtk interface. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Getting a color based on the R,G,B components
Hello, Is it possible to create at runtimne a TColor based on the three components R,G,B given as numbers ? Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Getting a color based on the R,G,B components
Henry ,Paul, thanks for your answers ! -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Setting the date format - TCalendar
Hello, When using TCalendar : by default the date format returned by TCalendar.Date is ShortDateFormat. Is it possible to set the date format so that it wouldn't be neccessary to convert the date to the desired format every time i am accessing the selected date , with : Edit1.Text : = FormatDateTime('dd-mmm-', Calendar1.DateTime);? Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: Elastic tabstops
On 9/11/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote: For people like me that don't know how to execute a *.jar files (smile) here is the syntax. java -jar ETNotepad.jar The more I played with that demo editor the more I liked the idea of implementing 'elastic tabstops' in Lazarus. I believe this will be a excellent addition to the editor and should make code formatting uniform. Hello, These elastic tabstops seem to be a nice new feature, because allows to properly indent the source code even if the font is proportional ( it's tricky to find a fixed-width font that works with Lazarus_gtk1 and looks nice at the same time ... ). Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Future Directions for Lazarus/FPC ? pythonise... !
On 7/31/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: Also, someone who comes on the freepascal website for the first time can very easily get the impression that FPC lacks any kind of database access. Just try it for yourself: - imagine that that you know nothing about fpc - go to www.freepascal.org - go to Documentation - open any of the reference docs. You'll find nothing about sqldb, mysql, firebird or postgres... That is because there is no reference documentation for these units. The reference documentation is exactly that: reference documentation. If none is available, we don't show it on the website. The correct place IMHO is under 'packages', where a small explanation of available packages should be placed. It badly needs updating. Oh, now i see them. I agree that the units that are not fully documented can't be included in the official reference manual. But in IMHO they deserve at least being mentioned in the Documentation page : in addition to the units documented in the reference manuals, there are also many contributed/unofficial/whatever units . You can find more about these units here, here and here . FPC surely has a lot of documentation, but it's scattered and sometimes you need to be very determined to find the piece of information that you need. A known problem. Some people thought the wiki would help out here, but it doesn't seem to happen. Well, a wiki can't magically get organized by itself. Wikis are chaotical by definition :-D If it is known that the documentation has issues , i guess that the most constructive thing for me to do is to raise issues on mantis when i spot an error or have an improvement idea, like : - in page Packages, clicking on Documentation opens an old version of that page (which doesn't include the link to FCL reference for example). Apparently the old page is docs.html and the new one is docs.var. - the Units and the Contributed Units pages seem to both refer to contributed units. Perhaps these should be unified ? - the Documentation page is unnecessarily bloated because the manuals are listed twice: once the PDF versions and then the HTML versions. A table with 3 columns would be clearer : title, link to HTML version, link to PDF version. (like this : http://www.oracle.com/pls/db102/portal.portal_db?selected=5 ) Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Future Directions for Lazarus/FPC ? pythonise... !
On 7/31/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Tue, 31 Jul 2007, Charl van Jaarsveldt wrote: Hi, Python has great support for arrays and dictionaries as part of the language. To me that is a great feature. I agree that the rest of it is just libraries that can just be included in your application. You have the same in free pascal: default array properties. Hello, In my opinion it is pretty easy to get under the impression that FPC has no lists or dictionaries. They are placed inside a unit with the cryptic name contrns . The docs are lacking a proper navigation/indexing system. Please see this issue : http://www.freepascal.org/mantis/view.php?id=9177 The problem is that for finding something you kind-of need to already know the name of the unit that contains that functionality. Also, someone who comes on the freepascal website for the first time can very easily get the impression that FPC lacks any kind of database access. Just try it for yourself: - imagine that that you know nothing about fpc - go to www.freepascal.org - go to Documentation - open any of the reference docs. You'll find nothing about sqldb, mysql, firebird or postgres... FPC surely has a lot of documentation, but it's scattered and sometimes you need to be very determined to find the piece of information that you need. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Transferring file with SFTP from a Lazarus application
Hello, Does anyone happen to know whether a (free)pascal unit for SFTP or SCP file transfer exists ? I am working on a (win32) application that has to get some data files from a server and then upload back another file. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Transferring file with SFTP from a Lazarus application
On 5/16/07, Vincent Snijders [EMAIL PROTECTED] wrote: Adrian Maier schreef: Hello, Does anyone happen to know whether a (free)pascal unit for SFTP or SCP file transfer exists ? I am working on a (win32) application that has to get some data files from a server and then upload back another file. I don't know about such components. I would use putty and its command line tool pscp to upload the file. Vincent, Michael, thanks for your answers. Using this pscp seems to be a good solution. I hope that it returns an appropriate return code , so that my application can detect when there was a problem with the transfer. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Ugly screenshot in the Lazarus Tutorial page on the wiki
Hello, I have noticed that this page http://wiki.lazarus.freepascal.org/Lazarus_Tutorial contains a link to a screenshot (http://lazarus-ccr.sourceforge.net/kbdata/lazide.jpg) that (in my opinion) is quite ugly and should be replaced with anything else . Is this mailing list the right place for my comment regarding the wiki ? (my apologies in case it isn't ..) Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Writing conduits for synchronising with Palm devices
Hello, Does anyone have experience in writing conduit applications with freepascal/lazarus ? (a conduit is an application that synchronizes a certain database on the Palm with the computer). I need to write a new application and i'd like to use lazarus. The application will : - download a set of pdb files from a (s)ftp server - copy the pdb's to the palm - (later) get the pdb's from the palm - upload the pdb files to the server. All that i could find so far regarding pascal and palm was the delphi-conduits project (http://sourceforge.net/projects/delphi-conduits/) but this one is not exactly what i need,because my application doesn't need to actually read/manipulate the data stored in the pdb's . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Document editing (doc, rtf) and/or interfacing with external editors
On 3/29/07, Razvan Adrian Bogdan [EMAIL PROTECTED] wrote: I have 2 questions about document editing with Lazarus/FPC and i hope that someone reading the list might know the answer to at least one of them, the best way would probably be editing documents internally in a Lazarus app but it might be a bit of a problem so interfacing with external editors is a good alternative. Is there any way to edit documents in doc/rtf format with lazarus ? How to interface with external document editors like MS Office, OpenOffice, AbiWord, etc. ? 1)It is possible to run any of those editors from within a Lazarus application, as separate processes. 2)OpenOffice can be run as a server that waits for connections and can communicate with other programs. I have seen a Java application that was batch processing documents in several steps : one of those steps was to use OpenOffice for converting from doc to xml . So, in theory it should be possible for a Lazarus application to do the same thing and communicate with OpenOffice through sockets . I don't know exactly how much of OpenOffice's functionality is available for the programs that are connecting to it. 3)As far as i know, it is not possible to embed MS Office through OLE (it's not crosss-platform...). -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Document editing (doc, rtf) and/or interfacing with external editors
On 3/29/07, Razvan Adrian Bogdan [EMAIL PROTECTED] wrote: On 3/29/07, Adrian Maier [EMAIL PROTECTED] wrote: 1)It is possible to run any of those editors from within a Lazarus application, as separate processes. That wouldn't be a problem, yes. In this case , it looks like this is the way to go. http://wiki.lazarus.freepascal.org/Executing_External_Programs 2)OpenOffice can be run as a server that waits for connections and can communicate with other programs. I have seen a Java application that was batch processing documents in several steps : one of those steps was to use OpenOffice for converting from doc to xml . So, in theory it should be possible for a Lazarus application to do the same thing and communicate with OpenOffice through sockets . I don't know exactly how much of OpenOffice's functionality is available for the programs that are connecting to it. OOo has Java and C++ support as well as scripting even for VB syntax but no pascal or plain C, i have no idea how the protocol looks like. I don't know more about the protocol either. You'll have to do some research in OO's docs. But, assuming that OpenOffice is a server who is waiting for tcp/ip connections , it wouldn't matter which language is the client written with. Once you understand the protocol it should be possible to implement in pascal a client for it . 3)As far as i know, it is not possible to embed MS Office through OLE (it's not crosss-platform...). Win only is enough for now but Lazarus doesn't support ActiveX (COM) Razvan _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] PostgreSQL
On 3/28/07, Darmawan Sugiarto [EMAIL PROTECTED] wrote: Thanks for your support but it's not work... I try change like this PQConnection1.HostName:='localhost'; PQConnection1.UserName:='superuser'; PQConnection1.Password:='admin'; PQConnection1.DatabaseName:='db'; But If i change PQConnection1's properties It's work before I compile my code... If I compile my code I see that error I don't know where is the mistake??? Unfortunately i have no windows machine around to try creating a small application that connects to postgres. Have you verified that it is possible to connect to postgres with the psql using the same parameters that you are using in your application ? Command prompt : psql -h localhost -U superuser db -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] PostgreSQL
On 3/28/07, Darmawan Sugiarto [EMAIL PROTECTED] wrote: hello guys... I used PostGreSQL 8.0.3 and WIn32 I try to connect my first project with Lazarus to PostGreSQL but there is an error...EDatabaseError - could not translate host name 172.0.0.1 to address: Unknown host... Here my simple code procedure TForm1.BitBtn1Click(Sender: TObject); begin PQConnection1.HostName:='127.0.0.1'; PQConnection1.UserName:='superuser'; PQConnection1.Password:='admin'; PQConnection1.Open; end; You could try to set the hostname to 'localhost' instead of '127.0.0.1' . Or specify the ip address of your ethernet card ( by default PostgreSQL accepts only local connections ). But first of all, you should make sure that PostgreSQL accepts TCP/IP connections . Are you able to connect with : psql -h 127.0.0.1 -U user database_name ? Also : (this may not work in Win32) in Linux it is possible to leave the hostname empty , which means that the program will connect to postgresql using local sockets (which don't exist on windows). Thanks Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Fonts in gtk1 (partially offtopic)
Hello, I am compiling Lazarus with the gtk1 interface (in Mandriva Linux 2007), and unfortunately can't find any font for the code editor that looks acceptable. a) I'm wondering what fonts are other people using? b) In the Select a font dialog when selecting most of the fonts, it says The selected font is not available. What does this mean? Is it possible to do something so that those fonts can be used? c) Also, when running my application (built with lazarus) it also uses a very ugly (hard-to-read) font. In order to change it is it true that it can be configured with the ~/.gtkrc file? Does anyone happen to know some links with clear information about setting fonts for gtk1 applications? Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Fonts in gtk1 (partially offtopic)
On 3/7/07, Henry Vermaak [EMAIL PROTECTED] wrote: On 07/03/07, Adrian Maier [EMAIL PROTECTED] wrote: Hello, I am compiling Lazarus with the gtk1 interface (in Mandriva Linux 2007), and unfortunately can't find any font for the code editor that looks acceptable. a) I'm wondering what fonts are other people using? b) In the Select a font dialog when selecting most of the fonts, it says The selected font is not available. What does this mean? Is it possible to do something so that those fonts can be used? c) Also, when running my application (built with lazarus) it also uses a very ugly (hard-to-read) font. In order to change it is it true that it can be configured with the ~/.gtkrc file? Does anyone happen to know some links with clear information about setting fonts for gtk1 applications? Cheers, Adrian Maier see this: http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_have_Ubuntu_Breezy_and_my_fonts_in_Lazarus_IDE_look_too_big it works for me, but you might have to fiddle a bit. i also use the terminus font for the editor. was the cleanest one i could find... I don't have Terminus in the font list. The code editor seems to be unable to use most of the fonts that exist on the system. Where does this limitation come from ? Thanks for the link, Henry. I have found that in the wiki, too (a little bit after posting my questions) and it makes the font a little smaller (which is a good sign because i know that is has an effect). But I haven't been able to configure a font properly. I admit that i don't understand how the font system actually , and i don't know how to write this of font names: -adobe-helvetica-.- . Am i the only one who kind this overly complex? -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Fonts in gtk1 (partially offtopic)
On 3/7/07, Marc Santhoff [EMAIL PROTECTED] wrote: Am Mittwoch, den 07.03.2007, 12:39 +0200 schrieb Adrian Maier: Hello, I am compiling Lazarus with the gtk1 interface (in Mandriva Linux 2007), and unfortunately can't find any font for the code editor that looks acceptable. a) I'm wondering what fonts are other people using? -misc-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 Thanks Marc. This font is ok. Size 15 with screen size 1600x1200 looks good for me. Somewhat similar to the old BorTE-font, maybe some people remember it from BPW/TPW on early Windows versions ... c) Also, when running my application (built with lazarus) it also uses a very ugly (hard-to-read) font. In order to change it is it true that it can be configured with the ~/.gtkrc file? Does anyone happen to know some links with clear information about setting fonts for gtk1 applications? Ask your favourite search engine for GTK theming. There are tutorials on that topic, too. Short: You can assign attributes (including colour, font, ...) to classes of or single widgets in the .gtkrc file. Example: snip style h1 { font = -*-helvetica-bold-r-*-*-17-*-*-*-*-*-*-* } style h2 { font = -*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-* } style label-14 { font = -*-helvetica-medium-r-*-*-14-*-*-*-*-*-*-* } widget_class *GtkFrame* style h1 widget_class *GtkLabel* style label-14 /snip In your application you've got to: snip gtk_init (@argc, @argv); gtk_rc_parse( your_preferred_rc_file ) ... other inits .. gtk_main (); /snip I see. Thanks, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] WikiHelp
On 2/23/07, Darius Blaszijk [EMAIL PROTECTED] wrote: Christian, Why don't you just make an example of what you mean? This way you can actually show what is possible. A picture says more than a thousand words. Just post a link here. Hello, The url posted by Christian links to a Deutsch site , where there is a very short description and the windows executable. I'm on linux, so the win binary is not of much help. I think that Christian is not receiving the feedback he needs simply because he didn't make it clear enough what the WikiHelp application is, and how does it work. You give WikiHelp an url and it downloads the wiki pages recursively ? In this case, how is it different from wget ? Does it also allow browsing of the downloaded pages? Some screenshots and a longer description (in English...) would help people understand what WikiHelp is about. The idea of having a tool for having a local copy of the wiki is a good one, for at least these reasons: - all of the Lazarus articles, tutorials, etc are on the wiki - some people don't have web access all the time - browsing a local copy of the wiki is faster , assuming that browsing is done with a viewer called from within the ide. (Reading the local copy of the wiki with a web browser wouldn't be good enough, and it wouldn't be worth the trouble). I have no idea how would WikiHelp fit into this . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Linux snapshot and fpc 2.1.1 ??
On 1/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Is there a way to use the Linux daily snapshot (for instance lazarus-0.9.21-20070124.i386.rpm) with fcp 2.1.1 instead of fpc 2.0.4 ? Or, maybe it is possible for the Lazarus team to provide daily snapshots for Lazarus + fpc-2.1.1, just like they do for Windows? Thanks, and keep on the good work !! Hello Paul, If you update Lazarus frequently you may find more handy to update from the subversion repository instead of downloading the daily snapshots. In this scenario, you could install whichever version of fpc you like, and separately checkout the lazarus sources and compile them. When you want to update lazarus you would get the differences with ' svn update ' and then recompile lazarus with ' make '. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Treating TProcess output
On 12/13/06, Arí Ricardo Ody [EMAIL PROTECTED] wrote: I'm developing little application for compress/uncompress data using tarball or Zip with a graphical front end. When I submit a tarball command with an error via TProcess I am not receiving the same messages that appear in the screen when I type the same tarball command via linux konsole. Hello Ari, Well, all the programs have 3 standard files : input, output and error. The 'standard error' is usually used for writing errors, warnings and other messages. The standard error is different from the standard output because it is desirable that the messages (which could be just warnings or debugging messages) don't pollute the program's output. Also, a separate standard error allows a program to have its output redirected through a pipe , and at the same time write progress information on the screen. When you run a program from the command line : both 'standard output' and 'standard error' are associated to the screen (console). But when calling the same program with TProcess , the program's output will be separated : some data go to TProcess.Output , and some other data go to TProcess.StdErr . You have two options: - add the poStderrToOutPut to the Options of your TProcess object . This will tell TProcess to Redirect standard error to the standard output stream. - or, read the messages from TProcess.StdErr similarly to how you read from TProcess.Output . The second option is probably better . I sent an e-mail to this mailing list with the source of the procedure where I'm trying to catch the tarball output via TProcess.Output. No one answer my e-mail. No problems, I'm not complaining. In my example, the length of messages generated in the konsole is less than 2kb, the length of linux Pipe. I suppose that I'm not losing data by this way. I'm writing to ask if someone knows some place where I can get more information about this matter. Please. Greetings from Sao Paulo - Brazil Ricardo _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] repository
On 12/11/06, Vincent Snijders [EMAIL PROTECTED] wrote: George Birbilis schreef: All this is possible, but IMHO it is nonsense to put effort into creating such a snapshot. I think there is some intelligence test, test if people persevere enough. If a person cannot find the link to getting the sources from the home page and follow those instructions to get a svn checkout, it is unreasonable to expect such a person to provide sensible patches. I can't say I agree, people with experience and skills don't have the time to spend reading all those instructions etc. So they must be very determined to fix or enhance something that bugs them in Lazarus or if they like very much to contribute something back to Lazarus. In both cases the time they lose in setting this up (if they don't get discouraged and give up in the first place) is lost from time they'd give in reading the sourcecode and possible fixes/enhanchements they'd do (and contribute). Maybe, maybe not. Regarding size, we could have a clever autodownloader/installer that reads a config/instructions file online from Laz site and grabs the correct FPC archive from FPC site, unpacks it etc., same with Laz files and places them were needed Yes, please implement this. I cannot wait for your patches, because I have been dreaming for something like this for two years now and I never seem to come to it, there always thinks I like to do more or find to be more missing in Lazarus. Regarding the .svn folder I believe if it's standard it should be in the snapshot (it doesn't take much size after all) so that one can go on and use the SVN after they initially get a snapshot (for quickstarting) It is standardized for all platforms, but not for all versions. For example, if I created the sub directory with svn 1.4, you cannot read it with svn 1.3. The .svn directories would certainly double the size of the snapshot. The size of the .svn directories is the price paid for being able to do 'svn status' , 'svn diff' without touching the server. However, snapshots can only be updated by downloading a newer one - which is a big disadvantage because of their size. Using the svn version is much more convenient than the snapshots because updating is way cheaper . On the other hand, it would be nice to have an Update Lazarus option in the menu for synchronizing the files that exists on the local machine with those that exist on a server . This functionality would be configurable to allow choosing between updating to the latest development version or to the stable version(s). I'm thinking about something similar to rsync (that can synchronize a local directory with a remote one with minimal data transfer : it only transfers the modifications ). Unfortunately (as far as i know) rsync is not truly cross-platform : some time ago when i needed a rsync client for windows i found only one based on the cygwin emulation. But it doesn't seem to be extremely hard to build something like : - the Lazarus tree is put on a ftp server - inside the tree there is a file containing (for axemple) the list of files and their md5 checksums - when a user clicks Update Lazarus , the program downloads the list of files and compares it to what exists on the local machine. And then downloads the files that were added or modified. Probably this is just an idea for the future : for Lazarus 1.0 and beyond ? Right now Lazarus is under active development and updating through svn works just fine in my opinion . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: SPAM-LOW: Re: [lazarus] TXMLDocument help
On 12/5/06, Tony Pelton [EMAIL PROTECTED] wrote: On 12/4/06, Lee [EMAIL PROTECTED] wrote: Michael Van Canneyt wrote: On Sun, 3 Dec 2006, Lee wrote: I've only used a couple of XML DOM/Libraries and each seems to work differently than this although its probably just semantics. fwiw, i've done quite a bit of XML work over the years in Java for my day job. any DOM implementation i've used in Java represents : fooa value/foo as (2) nodes, foo being the parent of a TEXT node, and the text node child being the node whose value is a value. Hello, As the others have already mentioned: when using DOM it is expected to have a child node of type text . (this is probably true for SAX parsers, too) I'd like to add just one thing: it is not guaranteed to have only one child node of type text. The value can be splitted across several text nodes. So, in order to get the value you may need to access all the child nodes of type text and concatenate their values. a couple of other concepts that help to clarify why the DOM works this way : fooa valuefoo2has another value/foo2/foo. a value, the text node, and foo2 are both child nodes of foo. (forgive me, i always forget CDATA syntax ...) foo!CDATA[a value]]//foo ... is structurally equivalent to ... fooa value/foo this is very convenient from an API perspective, as the programmer typically doesn't care about the type of the node holding the text and it's behavior, you just want the text value, and again, it's convenient that you don't have to worry about whether it is a plain text node, or a cdata node. if you _needed_ to know, you can interrogate the node for its type. For instance, with .net, I would access that value (123) with Node.InnerText. my $0.02 ... try to avoid learning how standards based mechanisms work by using MS API's as your reference implementation. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Python interpreter linked with a Lazarus application
On 11/23/06, Uwe Grauer [EMAIL PROTECTED] wrote: Adrian Maier wrote: Hello, I am trying to run a python program from a Lazarus application. Executing it with TProcess is working fine, but it is slow from the user's perspective : it takes a few seconds until the program shows up. The python script works with no problems when it is run on its own. The lazarus application is compiled with gtk1. The python application is also using wx (which uses gtk on linux). So, my question is : is it possible to have problems because the gtk library is used at the same time from pascal and python ? Other ideas? Best wishes, Adrian Maier You should look at P4D (Python for Delphi). AFAIK it also works with lazarus. http://mmm-experts.com/ Thanks for the tip, but I've dropped the idea of linking python with the pascal application. I'll call an external python program and communicate with it with pipes probably. I knew that Python for Delphi exists , but looking at the site i haven't seen any reference to freepascal. Does it work with freepascal in a cross-platform way ? Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Sloppy behaviour while editing (probably because of the window manager)
On 11/7/06, Mattias Gaertner [EMAIL PROTECTED] wrote: On Sun, 05 Nov 2006 12:09:59 +0100 Bogusław Brandys [EMAIL PROTECTED] wrote: Adrian Maier wrote: Hello, While editing source code in Lazarus, i am currently noticing the following behaviours: (Linux ; Lazarus (svn) compiled with gtk2 ; freepascal 2.0.4.) 1) In XFCE4: after choosing a method/property from the code completion popup, the focus is set to the window that contains the menu and tools (instead of the editor window). So, i must click on the editor before going on with typing code. 2) In KDE, the behaviour is even more annoying: apart from the above problem , i also need to click on the code completion popup because it is not getting focus and therefore the arrows don't work . As you can imagine, this behaviour is quite irritating . A lot of mouse clicks... This is probably not a bug in Lazarus, but the window manager. What do you think ? If it works with gtk1, then it is a LCL gtk2 interface bug. Does it work with gtk1 for you? Under gnome it works with gtk1. In gtk1 it works fine. So in this case it's a gtk2 problem. Well,I think it might be a Lazarus code completion bug. I think that correct behavior is not show it modally (eating focus) but let user type further code and bold part of code currently typed - like in delphi. Under linux/gtk1/gnome I can type code, when the completion box is open. Cursor keys UP/Down switches selection. Return key closes box and replaces identifier with selection. Shift+Return appends identifier. Escape closes box without change. Normal key ('a'..'z') appears in the source editor and reduces the shown possibilities in the box. I found it very handy.If this is too difficult maybe it's possible to allow using Ctrl+J even inside code part To avoid misunderstanding: Ctrl+J is code template. Do not confuse this with Ctrl+Space identifier completion (Delphi slang: code completion) and Ctrl+W word completion. All three show the completion box. I was referring to identifier completion: Ctrl+Space , followed by dot to see the object's methods and properties. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Sloppy behaviour while editing (probably because of the window manager)
On 11/7/06, Mattias Gaertner [EMAIL PROTECTED] wrote: On Tue, 7 Nov 2006 11:09:34 +0200 Adrian Maier [EMAIL PROTECTED] wrote: [...] On 11/7/06, Mattias Gaertner [EMAIL PROTECTED] wrote: On Sun, 05 Nov 2006 12:09:59 +0100 Bogusław Brandys [EMAIL PROTECTED] wrote: Adrian Maier wrote: Hello, While editing source code in Lazarus, i am currently noticing the following behaviours: (Linux ; Lazarus (svn) compiled with gtk2 ; freepascal 2.0.4.) 1) In XFCE4: after choosing a method/property from the code completion popup, the focus is set to the window that contains the menu and tools (instead of the editor window). So, i must click on the editor before going on with typing code. 2) In KDE, the behaviour is even more annoying: apart from the above problem , i also need to click on the code completion popup because it is not getting focus and therefore the arrows don't work . As you can imagine, this behaviour is quite irritating . A lot of mouse clicks... This is probably not a bug in Lazarus, but the window manager. What do you think ? If it works with gtk1, then it is a LCL gtk2 interface bug. Does it work with gtk1 for you? Under gnome it works with gtk1. In gtk1 it works fine. So in this case it's a gtk2 problem. Then please create bug report, so it is not forgotten. Ok. [...] To avoid misunderstanding: Ctrl+J is code template. Do not confuse this with Ctrl+Space identifier completion (Delphi slang: code completion) and Ctrl+W word completion. All three show the completion box. I was referring to identifier completion: Ctrl+Space , followed by dot to see the object's methods and properties. Maybe you mean 'dot' followed by Ctrl+Space? Sorry for not being clear. In fact it was : enter the beginning of the variable, press ctrl-space so that the editor completes the name , then press dot . After a short delay the popup normally appears without the need to press Ctrl-space again after the dot. Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Sloppy behaviour while editing (probably because of the window manager)
Hello, While editing source code in Lazarus, i am currently noticing the following behaviours: (Linux ; Lazarus (svn) compiled with gtk2 ; freepascal 2.0.4.) 1) In XFCE4: after choosing a method/property from the code completion popup, the focus is set to the window that contains the menu and tools (instead of the editor window). So, i must click on the editor before going on with typing code. 2) In KDE, the behaviour is even more annoying: apart from the above problem , i also need to click on the code completion popup because it is not getting focus and therefore the arrows don't work . As you can imagine, this behaviour is quite irritating . A lot of mouse clicks... This is probably not a bug in Lazarus, but the window manager. What do you think ? -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] oracle
On 10/18/06, Dwi Kristianto [EMAIL PROTECTED] wrote: dear all, is there any oracle client component for lazarus? need it a.s.a.p Hello, As far as I can see, the sqldb unit has support for oracle databases. I haven't tried it myself though . The sqldb tab contains TIBConnection, TODBCConnection, TPQConnection, TMysqlConnection - but no TOracleConnection . I think that, until the TOracleConnection is added to the palette, you could do one of: - create the connection manually , or - if you are on Windows, use the odbc component. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] oracle
On 10/18/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: Hello, As far as I can see, the sqldb unit has support for oracle databases. I haven't tried it myself though . The sqldb tab contains TIBConnection, TODBCConnection, TPQConnection, TMysqlConnection - but no TOracleConnection . That's simply because it is not registered. You can add the registration yourself: open registersqldb.pas in lazarus/components/sqldb, add oracleconnection to the uses list, and add the following TOracleConnection, before the line with TPQConnection, which is line 61. I suspected that it's trivial to add it if you know enough details about how is Lazarus implemented ,but not that it's *so* easy ! Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] First Success with Lazarus!
On 10/15/06, Nataraj S Narayan [EMAIL PROTECTED] wrote: Hi So, if i create and delete components in the code itself, rather than using at design time, will bring down the size? I doubt that it works that way. You would still use those components, no matter how exactly you added them to the application . Did you also try the upx packer? Maybe it would shrink the program more than 2.7 mb. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Advice about creating database-aware application with Lazarus
On 10/10/06, Joost van der Sluis [EMAIL PROTECTED] wrote: Well... As I read it, that's not the problem. All changes are made in an update-buffer first. So if you do a 'delete' in the grid, the records get deleted in that buffer. Thus the record should disapear immediately in the grid. But not yet on the database. The 'delete'-sql is only send to the database on the .applyupdates command. And committed on the .commitretaining. Thus that can happen much later. (on the click on the 'save' button) But if I understood you correctly, the delete fails immediately. That means that there's a problem in the deletion of records in a grid. Or in the .delete from Tbufdataset. You first have to test that. Easiest way is to add a button 'delete' which does sqlquery1.delete. That'll delete the current record, and it should be immediately visible in the grid. Else you could do a .refresh after the .delete, to be sure that the grid gets refreshed. (If not, it's a bug, btw) I've added a button which calls query1.Delete. The row disappears from the grid now. So, it looks like TdbNavigator's Delete button does something different than it's supposed to do ? However, when I press Save (which does applyupdates and commitretaining) the program crashes with : TApplication.HandleException Access violation Stack trace: $08211A8E $0821AE3F TCUSTOMDBGRID__UPDATESCROLLBARRANGE, line 1336 of dbgrids.pas $0821B013 TCUSTOMDBGRID__DOLAYOUTCHANGED, line 1402 of dbgrids.pas $0821CB35 TCUSTOMDBGRID__ENDLAYOUT, line 2164 of dbgrids.pas $0821B660 TCUSTOMDBGRID__LAYOUTCHANGED, line 1568 of dbgrids.pas $08219DA2 TCUSTOMDBGRID__ONDATASETCHANGED, line 814 of dbgrids.pas $0821E518 TCOMPONENTDATALINK__DATASETCHANGED, line 2722 of dbgrids.pas $0820E0F4 $0820EEF5 $0820F10B $08202E6B $08205F5D $08211320 $08211264 $0807DE10 TFORMASIMPLA__ACTIONCOMMITEXECUTE, line 85 of forma_simpla.pas $0808DDB5 $081755F2 TCONTAINEDACTION__EXECUTE, line 110 of ./include/containedaction.inc In ContainedAction.inc: function TContainedAction.Execute: Boolean; begin Result := (ActionList nil) and ActionList.ExecuteAction(Self) or ((ApplicationActionComponentnil) and ApplicationActionComponent.ExecuteAction(Self)) or inherited Execute // - line 110 or (SendApplicationMessage(CM_ACTIONEXECUTE, 0, PtrInt(Self)) = 1); end; Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Advice about creating database-aware application with Lazarus
Hello, I am in the process of learning how to build applications with Lazarus. The goal is to rewrite some text-mode applications in Lazarus, so that they have a GUI . Unfortunately, building data-aware forms proved to be quite difficult so far. I have a form that includes: a TdbGrid and a TdbNavigator. I want to use the same form to acces any of three different tables, by specifying one sql query or another. - deleting rows doesn't work for any of the tables. The user is asked to confirm, but the row is not deleted. - updating works , for the tables that have a simple primary key - for the table that has a 3-column primary key, i have been able to specify a custom sql command . The update reaches the database, but the transaction is no longer committed. The same save button commits the data for the other tables, though. As you can see, there are many problems that frustrating and not easy to be solved by a newbie. I'm not sure whether the problem is only my lack of knowledge, or the support for PostgreSQL is simply not mature enough. I suspect that working with Firebird is better supported, because i have noticed that people around here tend to use firebird. So, i have several questions: a. Are there Lazarus users who have positive experience with developing data-aware applications using sqldb to access PostgreSQL? b. Are there any better solutions (except sqldb) to access PostgreSQL? It is hard to find documentation about sqldb, except from the source code and a set of examples. c. What is the approach that I should follow : should I consider dealing with the database manually? Simply associating a TdbGrid with a TsqlQuery is far from working out-of-the-box (at least with sqldb and postgres) . I'm not sure at all that the problem is sqldb ; maybe the combination postgres+sqldb+lcl is not tested enough yet. What is its exact status? Or maybe there are small tricks that are evident for the experienced developers. Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Advice about creating database-aware application with Lazarus
On 10/9/06, Christian Ulrich [EMAIL PROTECTED] wrote: - deleting rows doesn't work for any of the tables. The user is asked to confirm, but the row is not deleted. maybe its deleted and not drawn in the dbgrid ?? Nope. I am monitoring all the commands that are sent to the database, and I haven't seen any DELETE. Also, after restarting the program the row is still there. I'm pretty sure that for some reason the delete command is not executed at all. I'm not sure at all that the problem is sqldb ; maybe the combination postgres+sqldb+lcl is not tested enough yet. What is its exact status? Or maybe there are small tricks that are evident for the experienced developers. I have also problems with sqldb + mysql but i think this is mostly the mysql implementation from fpc. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Advice about creating database-aware application with Lazarus
On 10/9/06, Joost van der Sluis [EMAIL PROTECTED] wrote: On Mon, 2006-10-09 at 14:05 +0300, Adrian Maier wrote: I have a form that includes: a TdbGrid and a TdbNavigator. I want to use the same form to acces any of three different tables, by specifying one sql query or another. - deleting rows doesn't work for any of the tables. The user is asked to confirm, but the row is not deleted. - updating works , for the tables that have a simple primary key - for the table that has a 3-column primary key, i have been able to specify a custom sql command . The update reaches the database, but the transaction is no longer committed. The same save button commits the data for the other tables, though. Are you sure all queries has the same transaction? Yes, I think. It's only one form. In the OnActivate event handler, there is a 'case' where I set the sql query according to a parameter. So, the bahaviour is supposed to be the same for the three different tables. I'm not sure whether the problem is only my lack of knowledge, or the support for PostgreSQL is simply not mature enough. I would guess it's both. The problem that you encountered so far, weren't postgres-related. So switching to fb won't help much. Switching isn't an option anyway. In fact i am porting an older application, and I have no plan to reimplement all the reports so that they work with another databases. c. What is the approach that I should follow : should I consider dealing with the database manually? Simply associating a TdbGrid with a TsqlQuery is far from working out-of-the-box (at least with sqldb and postgres) . Just submit bug-reports. There are so many things you can do with the database-utils, it's impossible to check them all. For some it will work out-of-the-box, for others it oculd be somewhat more difficult. I see. Multiple-fields-primary keys, for example, I consider as a bad design. (I can imagine some exceptions, but those are really rare) Must db- programmers won't use them, so for them it works 'out-of-the-box'... Well, this case is rare indeed : I have only one such table. But it's an important one and it makes sense to have a 3-column primary key. This issue is now solvable, but i haven't decided yet exactly how ( i could either specify the queries manually , or use a surrogate key ). The current big problem is that deleting rows doesn't work. After confirmation, the grid flickers a litlle (the data is re-read i think) and the row is still there ! There is no DELETE sent to the database . Any ideas?how is the deletion supposed to work? Just submit bug reports if you found them, and ask here for help. That's probably the best you can do, and the best for fpc/lazarus. Yes, I know that. I am currently in a quiet period at work and have plenty of time to experiment. The bad thing is that I have the feeling that the progress is too slow . And my messages seem to show up on the list after many hours, therefore I can try the advices only the second day. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Advice about creating database-aware application with Lazarus
On 10/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mon, 9 Oct 2006, Adrian Maier wrote: On 10/9/06, Christian Ulrich [EMAIL PROTECTED] wrote: - deleting rows doesn't work for any of the tables. The user is asked to confirm, but the row is not deleted. maybe its deleted and not drawn in the dbgrid ?? Nope. I am monitoring all the commands that are sent to the database, and I haven't seen any DELETE. Also, after restarting the program the row is still there. I'm pretty sure that for some reason the delete command is not executed at all. Did you call applyupdates ? I think SQLQuery does some buffering of commands ? Yes: I have a save button that does: query1.ApplyUpdates; Ftransaction.CommitRetaining; -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
On 10/6/06, Adrian Maier [EMAIL PROTECTED] wrote: On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). What you could do: compile the sqldb-unit with debuginfo and place a breakpoint on line 1181. And then take a look at qry.sql.text. Or simply place a 'writeln(qry.sql.text);' on that line. Recompile fpc and try again... I was hoping that recompiling sqldb wasn't neccessary . But if there's no other way ... I have added some writelns inside pqconnection.pp just before the PQexec calls. The query that causes the error is : ' prepare prepst2 (int,int,numeric,text,int,text,int) as update PROD set mag=$1,cod=$2,pu=$3,den=$4,p_vinz=$5,um=$6,stoc_ini=$7 where ' Which is incomplete... It looks liek it wasn't able to detect the columns that form the primary key. This table has a PK made up of 3 columns. Can sqldb handle multi-column primary keys ? -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
On 10/6/06, Adrian Maier [EMAIL PROTECTED] wrote: On 10/6/06, Adrian Maier [EMAIL PROTECTED] wrote: On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). What you could do: compile the sqldb-unit with debuginfo and place a breakpoint on line 1181. And then take a look at qry.sql.text. Or simply place a 'writeln(qry.sql.text);' on that line. Recompile fpc and try again... I was hoping that recompiling sqldb wasn't neccessary . But if there's no other way ... I have added some writelns inside pqconnection.pp just before the PQexec calls. The query that causes the error is : ' prepare prepst2 (int,int,numeric,text,int,text,int) as update PROD set mag=$1,cod=$2,pu=$3,den=$4,p_vinz=$5,um=$6,stoc_ini=$7 where ' Which is incomplete... It looks liek it wasn't able to detect the columns that form the primary key. This table has a PK made up of 3 columns. Can sqldb handle multi-column primary keys ? Apparently it doesn't :-( or it doesn't work for postgres. Replacing the 3-columns primary key with a single-column primary key caused the problem to disappear. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
The query that causes the error is : ' prepare prepst2 (int,int,numeric,text,int,text,int) as update PROD set mag=$1,cod=$2,pu=$3,den=$4,p_vinz=$5,um=$6,stoc_ini=$7 where ' Which is incomplete... It looks liek it wasn't able to detect the columns that form the primary key. This table has a PK made up of 3 columns. Can sqldb handle multi-column primary keys ? Apparently it doesn't :-( or it doesn't work for postgres. Indeed. Somewhere in the code there's a comment like: 'ToDo: Multiple fields-indexes should be parsed here...' Replacing the 3-columns primary key with a single-column primary key caused the problem to disappear. Could you write a bug-report for it? Also mention that it should generate an error, if something like this happens. Instead of sending incomplete requests to the db-server. Ok, I will . As a temporary solution you can do: sqlquery1.updatesql := 'update PROD set mag=$1,cod=$2,pu=$3,den= $4,p_vinz=$5,um=$6,stoc_ini=$7 where ...'; But then complete, offcourse. That way it doesn't try to generate the update-query automatically, but it uses the query that you provide. I'll try this approach. Many thanks for your help, Joost ! Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] How to debug when accessing database with sqldb
Hello, I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). Enabling the statement logging in postgres doesn't help in this case, because the sql command is not recognised at all, and therefore it doesn't show up in the log. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] test (please ignore)
-- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). Enabling the statement logging in postgres doesn't help in this case, because the sql command is not recognised at all, and therefore it doesn't show up in the log. It's more then 132 characters long, so it should be in the log? The size is not important. I meant that i've configured postgres to write in the log all the queries that are executed, for debugging. Yet, the query which generates the error is not recognized as a query at all, and only the error appears in the log. Since it's with applyupdates. The SQL is probably parsed incorrectly. You can look what the updatequery.sql, modifyquery.sql etc. are. Maybe that that already reviels the problem. I'm afraid that i still don't understand how can I see those queries. What/where are the update.sql, modifyquery.sql that you are referring to? In the program i have the following variables: - Fconnection : tSQLConnection; - Ftransaction : tSQLTransaction; - query1: TSQLQuery; - ds1: TDatasource; - DBGrid1: TDBGrid; - DBNavigator1: TDBNavigator; The initialisation: CreateFConnection; CreateFTransaction; ds1.Enabled:=false; query1.Active:=false; Fconnection.Transaction:=Ftransaction; query1.DataBase:=Fconnection; query1.Transaction:=Ftransaction; query1.SQL.Clear; query1.SQL.Add('select DEN,CNP,C_FISCAL,LOC,REG_COM,JU,CONT,BANCA,ADR,COD_SOC from SOC_M'); query1.Active:=true; DBGrid1.DataSource:=ds1; ds1.DataSet:=query1; ds1.Enabled:=true; DBGrid1.Enabled:=true; The user updates some values in the grid, and then presses a button that does : query1.ApplyUpdates; --- the exception is generated here Ftransaction.CommitRetaining; I use identical code for other two tables - and updating works ! I have no idea what is different about this table. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] How to debug when accessing database with sqldb
On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: On Thu, 2006-10-05 at 17:19 -0400, Adrian Maier wrote: On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote: I'm using Sqldb to access a PostgreSQL database. Is it possible to find out easily what sql commands is sqldb generating and trying to execute ? I have a DBgrid which is associated to a table. After updating a row and executing query.ApplyUpdates , the program generates an exception : An error occurred while applying the updates in a query: preparation of query failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). Enabling the statement logging in postgres doesn't help in this case, because the sql command is not recognised at all, and therefore it doesn't show up in the log. It's more then 132 characters long, so it should be in the log? The size is not important. I meant that i've configured postgres to write in the log all the queries that are executed, for debugging. Yet, the query which generates the error is not recognized as a query at all, and only the error appears in the log. Can't you specify to log all the commands which are sent? This is precisely what I've tried. All the other statements are written in postgres's log, but the query we are talking about is not logged. Apparently it is very broken and parsing it fails at a very early stage , therefore PostgreSQL doesn't consider it to be a statement . Since it's with applyupdates. The SQL is probably parsed incorrectly. You can look what the updatequery.sql, modifyquery.sql etc. are. Maybe that that already reviels the problem. I'm afraid that i still don't understand how can I see those queries. What/where are the update.sql, modifyquery.sql that you are referring to? Seems that they aren't public. What you could do: compile the sqldb-unit with debuginfo and place a breakpoint on line 1181. And then take a look at qry.sql.text. Or simply place a 'writeln(qry.sql.text);' on that line. Recompile fpc and try again... I was hoping that recompiling sqldb wasn't neccessary . But if there's no other way ... Thanks Joost ! Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Lazarus and Ajax (was: Re: [lazarus] Database programming)
On 9/8/06, Cesar Romero [EMAIL PROTECTED] wrote: Burkhard Carstens escreveu: Am Freitag, 8. September 2006 01:18 schrieb Adrian Maier: On 9/7/06, Tony Maro [EMAIL PROTECTED] wrote: On that note I'd LOVE to see a series of Lazarus frameworks for implementing an Ajax application... That stuff is hard to code! An interesting dream indeed: to choose an 'ajax' library instead of gtk/qt/etc , then rebuild the lazarus application and obtain some kind of cgi that would be the web version of the application. Let me know, when the first beta is available! I'd test it immediately! ;-) Me too :-D Ok. For all the people who are interested: the release will be exactly on 8 oct , 12:35 GMT. The date can be changed anytime, and the year is not sure at all;-) Now seriously. I've found the link to that library. It's called Wt: a C++ Web Toolkit http://jose.med.kuleuven.ac.be/wt/Home.fcg?wtd=gUpPsXX4wFl4eIwMjs=yesajax=yes Assuming that this Wt has enough features, it might be possible to wrap it from LCL. But there is surely a lot of work involved, and I guess that only the basic controls will be supported. It is interesting to investigate nevertheless. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Database programming
On 9/6/06, Micha Nelissen [EMAIL PROTECTED] wrote: Michael Van Canneyt wrote: Not scalable ? In what way ? It's not multi-user and network-capable. This is also simply not true. It is multi-user capable, and can use files from a network share, but it's all done in the client, using file locking. So, you depend on the client to do the right thing and lock the files properly. This should be dbms's job , not the client's . In my opinion, using dbf files over shared folders is a solution only if you have an already working dbf-based application and you want to make it multi-client and network-capable without changing too much . If you start a new application, I see no reason not to use something better - that supports goodies like transactions and SQL . For a new stand-alone application I'd choose embedded-firebird with no hesitations. If later it is decided to make the application multi-user, the change to the client-server version of firebird would be easy. Sqllite might also be an option, but AFAIK Firebird's sql implementation is superior. It does not support transactions, true; but this is a feature, not about scalability. Yes transactions are just a feature , but a very important one. Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Database programming
On 9/6/06, bouquinique [EMAIL PROTECTED] wrote: One of the advantage off TDBF ( I 'm an user of it ): It dont't need other than himself. For me this pont is very important, firebird or SQL engines are not installed on all the computers. Créate fonctions to export dbf files in other formats like SQL, CSV, Or Firebird is not much difficult. Otherwise firebird is also good. Hello, Minimizing the requirements of your application is a good thing. But what you don't seem to be aware of is that embedded firebird is essentially a set of DLLs (or *.so in linux) and the database file. So you only need to install a few more files _together_ with your application . And the benefit is huge: you gain access to all the features of a real database system (with its sql language, transactions, constraints, etc) without loosing anything . It's not neccessary to install the whole firebird server on each computer ! This is funny: in this thread i become an advocate of firebird although in fact i mostly use PostgreSQL . :-) Cheers ! Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Database programming
On 9/7/06, Tony Maro [EMAIL PROTECTED] wrote: On Wed, 2006-09-06 at 23:55 -0700, Adrian Maier wrote: If you start a new application, I see no reason not to use something better - that supports goodies like transactions and SQL . For a new stand-alone application I'd choose embedded-firebird with no hesitations. If later it is decided to make the application multi-user, the change to the client-server version of firebird would be easy. Its a question of the right tool for the job, not a question of is a screwdriver superior to the hammer. Each tool fits a different use. Sure, each tool has its place (or else it would cease to exist because of the lack of users). The question is whether the features of a more complex tool is worth the overhead that it adds, in a specific situation. Each should of course do his/her own evaluation and choose what fits best. I'd use TDbf for a networked 5 user LAN environment, but if you want something that works under more latency, for instance over the Internet, or if you have more users you'll probably want a client-server transaction based DB model. My preference for a sql-based dbms is not neccesarily related to the number of concurrent users, but to the features that are available to the developer. For example, joining manually 4 tables with sums and 'group by' is not fun at all, compared to executing a simple sql query . It would have been a huge pain to generate the reports in my applications without a SQL engine ! If you want a single user application (or a few networked users) that is database enabled and doesn't require the end-user to know how to set up a database server, then products like TDbf are the answer. Or products like sqllite, firebird ... ;-) This discussion seems reminiscent of old discussions over networked use of Paradox versus going with... what was the C/S database engine Borland supplied? Are you referring to Interbase? So if you want to compare TDbf you'd compare it against text-file based database engines, Paradox, dBase components, etc. Other than the possibility of porting an old open-sourced text-file database engine for Delphi, I think TDbf is probably unique in it's class for Lazarus support. As a producer of commercial software for non-technical end-users, I'd never consider producing a MySQL, Firebird or MsSQL application. Aren't most of the applications made for non-techincal users (except from compilers, IDEs and other development tools) ? :-) The end-user level of expertise is too high for my market. With TDbf I only have to let the user pick a directory to store the data in, and provide an easy way to do backups. What extra actions should the end-users perform if the application uses sqllite or embedded-firebird ? If would be even cleaner because the database is a single file instead of a directory full of dbf and ndx files. On the topic of embedded firebird, I've never used it in Lazarus (is it even available and stable in Lazarus?) but the comment on their website The embedded runtime is 2 MB is reason enough for me to stick with TDbf. My total app with TDbf is smaller than that. You surely know better how to choose your tools according to the specific details of the application(s) you build . Cheers ! Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Database programming
On 9/7/06, Tony Maro [EMAIL PROTECTED] wrote: On that note I'd LOVE to see a series of Lazarus frameworks for implementing an Ajax application... That stuff is hard to code! An interesting dream indeed: to choose an 'ajax' library instead of gtk/qt/etc , then rebuild the lazarus application and obtain some kind of cgi that would be the web version of the application. I have seen some place a c++ library that contained some classes that can be used to write web applications in a gui-style . I might still have the link noted down somewhere. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Minor issue while compiling Lazarus
Hello, I have noticed that after : make clean ; svn update ; make it fails with this error: lazarus.pp(114,1) Error: Can't call the linker, switching to external linking If I execute make again, the error no longer appears and Lazarus is built successfully. Is this a known issue? The system is Linux (slackware 10.2), with fpc 2.0.4rc2 and the latest Lazarus (obtained with svn). Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Minor issue while compiling Lazarus
On 27/08/06, Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: Maybe you should do make clean all instead of only make This made no difference. make clean all gave the same error. If others can't see the same error this means that there is something strange only here on my machine.Sorry for the noise ;-) -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] parameterized queries
On 23/08/06, Zlatko Matić [EMAIL PROTECTED] wrote: Can you give me the download link for fpc-2.0.4-rc3 ? Thanks. I think that's it : ftp://ftp.freepascal.org/fpc/beta/2.0.4-rc3/ Are the 2.0.4 release candidates not really visible on purpose? I could not find no references on the website. In order to find them, one needs to browse the ftp.freepascal.org directories manually . In my opinion a new RC qualifies as a news item ( so that people would find out about it and test ... ) . And perhaps a Beta section could be added to the Download page . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] parameterized queries
On 24/08/06, Vincent Snijders [EMAIL PROTECTED] wrote: They were announce of the fpc mailing lists and people were invited to test them. Further more the Lazarus snapshots were modified to use the release candidates too. This has been announce on this mailing too. Not all possibly interested users are subscribed to (all of the) mailing lists. I'm just saying is that the RCs are hard to find from the fpc web site. It is not interesting for the developers, if people just use the release candidate. They are looking for people to really test and provide feedback. So the availability was as not widely announced a real release. This makes perfect sense. Speaking of feedback, in my case using 2.0.4 rc2 is now a must because it contains significant fixes in the sqldb+postgresql area. The rc2 is the only one that allowed me to have a working (editable) TdbGrid against PostgreSql. I haven't tried rc3 yet. Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] parameterized queries
On 24/08/06, Joost van der Sluis [EMAIL PROTECTED] wrote: On Thu, 2006-08-24 at 11:45 +0300, Adrian Maier wrote: On 24/08/06, Vincent Snijders [EMAIL PROTECTED] wrote: It is not interesting for the developers, if people just use the release candidate. They are looking for people to really test and provide feedback. So the availability was as not widely announced a real release. This makes perfect sense. Speaking of feedback, in my case using 2.0.4 rc2 is now a must because it contains significant fixes in the sqldb+postgresql area. The rc2 is the only one that allowed me to have a working (editable) TdbGrid against PostgreSql. I haven't tried rc3 yet. Then you should better use the snapshots. There are now already fixes in the 2.1.1 snapshot for postgres, which won't make it in 2.0.4. The rc's were only meant to test the installation-procedures on all different platforms. And maybe to see if there were any show-stoppers. It looks like I was overestimating the importance of the rc's ... That's why it's more usefull for the developers if people use the snapshots. Bugs like the sqldb-bug should already be found before we start building release candidates. Woudln't be using svn equally useful for the developers? I don't like snapshots: they are big compared to a 'svn up' . When trying development versions i'd rather go all the way and use svn . This is the branch that will eventually become the 2.0.4 release : http://svn.freepascal.org/svn/fpc/tags/release_2_0_4 , right ? Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Detecting when the current line changes inside a TSynEdit
Hello, I am writing a small html editor ; the purpose is to translate html pages in an easy way. I have two TSynEdit controls : one is read-only and displays the original file , and the 2nd is editable and is used to write the translated text. I wish to synchronise the two TSynEdits: when i move up and down in the editable SynEdit2, i'd like to make sure that the corresponding line is visible in SynEdit1. So, the question is which event could i use to detect when the user moves the cursor (caret) to another line ? Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: Detecting when the current line changes inside a TSynEdit
On 16/08/06, Adrian Maier [EMAIL PROTECTED] wrote: I am writing a small html editor ; the purpose is to translate html pages in an easy way. I have two TSynEdit controls : one is read-only and displays the original file , and the 2nd is editable and is used to write the translated text. I wish to synchronise the two TSynEdits: when i move up and down in the editable SynEdit2, i'd like to make sure that the corresponding line is visible in SynEdit1. So, the question is which event could i use to detect when the user moves the cursor (caret) to another line ? I've found a solution. It might not be the best one, but it does what i want: everytime i press a key in SynEdit2, it highlights the corresponding line in the other SynEdit1. procedure TFrmMain.SynEdit2KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); var l1,l2:integer; begin l1:=SynEdit1.CaretY; l2:=SynEdit2.CaretY; if l1l2 then begin SynEdit1.SelEnd:=SynEdit1.SelStart; SynEdit1.CaretY:=l2; SynEdit1.SelectLine; end; end; I am very impressed to see how easy it was to write this small editor (in about one day), considering how little experience i have with Lazarus. Best wishes, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] suggestion for relation object
On 25/07/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Tue, 25 Jul 2006, Bisma Jayadi wrote: I would consider 250 tables rather moderate. Wow... if 250 tables still considered as moderate, I wonder how many tables will you considered as huge? I've build some large scale database application but I never use more than 200-300 tables. If the tables more than 300 (max 500, IMO) then I think there's something wrong with the system design, and the system need to be redesigned or separated. In enterprise class systems 500 tables or more is not uncommon. Indeed. 250 tables would be limiting. There are certainly bigger applications that have more than that. For example I've worked on a project with Geneva billing system and that database was huge in number of tables and views. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: saving TdbGrid data to PostgreSQL
On 18/07/06, Joost van der Sluis [EMAIL PROTECTED] wrote: Hmm. i think i found something : TSQLQuery's ApplyUpdate method seems to send 'update' commands to pgsql. I have to keep looking, though, because deleting rows generates an ugly runtime error (Clear of selection failed ( PostgresSQL ERROR: current transaction is aborted, commands ignored until end of transaction block) ). Make sure that you're using the latest versions of fpc. And that error isn't that ugly. You have done something wrong, thereafter postgresql closed the transaction, but you still tried to do something else with that transaction. That's what it says. Please try with fpc 2.1.1 or 2.0.4-rcx Hello, I've upgraded to 2.1.1 (from svn so that i could upgrade easier in the future). I've started over to writte the small application, using a smaller table. To sum up: - i have a TdbGrid that gets properly populated with data read from a PostgreSQL table, with 4 fields : ID serial primary key, NAME varchar(20), AGE numeric, DT date . A TdbNavigator is asociated to the dataset. - insert seems to work - update seems to work - if the AGE field already has a value, I can't set it to empty (NULL). It complaints that : ' ' is not a valid float value. So, there is an issue with NULL values. - when i delete a row, it asks me to confirm. Later i get an error when I press on a button called Save which does: procedure TForm1.Button1Click(Sender: TObject); begin SQLQuery1.ApplyUpdates; SQLTransaction1.Commit; end; In the console it writes: TApplication.HandleException Access violation Stack trace: $081F894D $081FDD77 TCUSTOMDBGRID__DOLAYOUTCHANGED, line 1388 of dbgrids.pas $081FF899 TCUSTOMDBGRID__ENDLAYOUT, line 2149 of dbgrids.pas $081FE3E2 TCUSTOMDBGRID__LAYOUTCHANGED, line 1554 of dbgrids.pas $081FCB54 TCUSTOMDBGRID__ONDATASETCHANGED, line 800 of dbgrids.pas $0820121C TCOMPONENTDATALINK__DATASETCHANGED, line 2703 of dbgrids.pas $081F563A $081F82A0 $081F81ED $08106964 TCONTROL__CLICK, line 1876 of ./include/control.inc $08158C8F TBUTTONCONTROL__CLICK, line 57 of ./include/buttoncontrol.inc $0815A6E5 TCUSTOMBUTTON__CLICK, line 187 of ./include/buttons.inc $0815AAB1 TBUTTON__CLICK, line 298 of ./include/buttons.inc $0815A8AA TCUSTOMBUTTON__WMDEFAULTCLICKED, line 242 of ./include/buttons.inc $0805D889 $080FDE7B TWINCONTROL__WNDPROC, line 3399 of ./include/wincontrol.inc $0811B6C9 DELIVERMESSAGE, line 3514 of gtkproc.inc The Button1Click method is the only piece of code i've written manually. What am I doing wrong? The database tutorial in the wiki has indeed a section about PostgreSQL, but it only explains how to obtain a read-only TdbGrid (which works for me,too), and nothing about actually editing the data. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] saving TdbGrid data to PostgreSQL
Hello, This is probably a newbie question. I have a small form that contains a TPQConnection, a TSQLTransaction, a TSQLQuery, a TDatasource, a TdbGrid and a TDBNavigator. The program is able to connect to the database , get the data and populate the TdbGrid. Now I'd like to improve the program: i wish to save the modified data back to the database. I have an exit button that currently only calls the transaction's commit method. But this is not enough : by monitoring postgresql's logs i have seen that no inserts or updates are executed. So, what should I do to save the modified data to the database? Thank you, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: saving TdbGrid data to PostgreSQL
On 18/07/06, Adrian Maier [EMAIL PROTECTED] wrote: Hello, This is probably a newbie question. I have a small form that contains a TPQConnection, a TSQLTransaction, a TSQLQuery, a TDatasource, a TdbGrid and a TDBNavigator. The program is able to connect to the database , get the data and populate the TdbGrid. Now I'd like to improve the program: i wish to save the modified data back to the database. I have an exit button that currently only calls the transaction's commit method. But this is not enough : by monitoring postgresql's logs i have seen that no inserts or updates are executed. So, what should I do to save the modified data to the database? Hmm. i think i found something : TSQLQuery's ApplyUpdate method seems to send 'update' commands to pgsql. I have to keep looking, though, because deleting rows generates an ugly runtime error (Clear of selection failed ( PostgresSQL ERROR: current transaction is aborted, commands ignored until end of transaction block) ). -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: saving TdbGrid data to PostgreSQL
On 19/07/06, Joost van der Sluis [EMAIL PROTECTED] wrote: Hmm. i think i found something : TSQLQuery's ApplyUpdate method seems to send 'update' commands to pgsql. I have to keep looking, though, because deleting rows generates an ugly runtime error (Clear of selection failed ( PostgresSQL ERROR: current transaction is aborted, commands ignored until end of transaction block) ). Make sure that you're using the latest versions of fpc. And that error isn't that ugly. You have done something wrong, thereafter postgresql closed the transaction, but you still tried to do something else with that transaction. That's what it says. Please try with fpc 2.1.1 or 2.0.4-rcx Now I'm confused: where could I find those versions? svn? because in the download section only 2.0.2 appears. -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus/Freepascal Propaganda
On 17/06/06, Marco van de Voort [EMAIL PROTECTED] wrote: How about changing the word propaganda to Marketing. For me that word has a negative conation. To me propaganda implies lying and Marketing implies spreading the word or message. To me propaganda implies lying by a state, and marketing lying by a corporation. This is true ... Marketing is not neutral, but commercial. It does not mean exactly spread the word, but more likely build a strong image of something, so that people would buy it (sometimes at the expense of quality ...). Anyway, the idea of seling makes the term marketing not to fit very well in our case. Propaganda sounds better ( even though the word might have an issue because it was used in expressions like communist propaganda ). The most neutral term i can think of is Promoting FPC/Lazarus . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: Detecting user cancel
On 5/19/06, Arí Ricardo Ody [EMAIL PROTECTED] wrote: Suppose computer is doing a long processing. Then, someone that can copies some information that is available only during this processing, tries to interrupt the processing. I want to detect this and delete the privileged information(that otherwise would be encripted - sources of a interpreted language). Hello, My feeling is that deleting that information when the program is killed would only partially solve the problem , and would only give a false feeling of security. For instance: - since it's a long-running operation, it might be possible to copy the sensitive information before the processing ends ? (we are talking about some temporary files , right ? ) - someone might run the program inside a debugger, and stop the execution of the program just before the privileged information is deleted - giving that person enough time to inspect all the secrets. Perhaps it would be better to keep that information in memory in some kind of buffer ? that memory would be freed after the application is killed ; (again - i'm assuming that you are currently storing the information in some temporary files). Cheers, -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: Detecting user cancel
On 19/05/06, Arí Ricardo Ody [EMAIL PROTECTED] wrote: My Lazarus application will manage a list of programs to be converted and will run a tool(once for each file of the list) that uses an interpreter to execute sources that would writed in a ramdrive. I have no way of establish a communications with the interpreter in the way it takes the sources from a buffer of memory and not from a real drive. If you know what I mean... Hmm. I see. There is nothing you can do if the interpreter accepts input only from files. It's a shame that you can't pass the sources to the interpreter through pipes. Just curious: what interpreter is it ? -- Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus Help System Requirements
On 5/10/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Overview Windowze has 2 help system versions (*.hlp files and *.chm files). Un*x based systems have man (doesn't have links, discarted, sorry). I heard that *Linux (GNU/Linux, and others) doesn't have one. The man pages are not the only help format in Unix. In Linux/Unix there are also the info pages , which do support links. Some info pages also have an index ( i'm not sure when this index is generated) . The program is called 'info' . Info can be used to acces the regular man pages, too. (plus you can go to the related items in SEE ALSO by simply going on the item and pressing enter). By googling for more info about info, i've found that Info is in fact the official documentation format of the GNU project : http://www.gnu.org/software/texinfo/ Info might be really interesting : it is possible to generate several help formats from a single source : html, pdf, info, dvi, xml . Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] question about the code completion feature of Lazarus
On 5/10/06, Alexander Todorov [EMAIL PROTECTED] wrote: On 5/10/06, Adrian Maier [EMAIL PROTECTED] wrote: Hello, I have noticed that sometimes the code-completion (Ctrl-space) is not entirely accurate. I mean, sometimes it contains class members that in fact don't exist ( the non-existance is detected at compilation time ). For instance : i have an objectconnection: TSQLConnection . If later in the code I enter :connection. , the code-completion list contains a procedure CheckConnection. But the compiler says that there is no CheckConnection method. Where could this kind of discrepancies come from? The code-completion list contains all class members, not only those who are public or protected. I see. Well - displaying only the members that are accesible seems tricky because this depends on the context ( a protected method should appear inside a derived clas ) . But maybe the methods could be marked somehow (with a tiny icon) so that one can easily spot the difference ( red circle = private, yellow circle =protected, green circle = public ) ? Just an idea ... Thank you guys for the answers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] FPC question
On 4/19/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Wed, 19 Apr 2006, Adrian Maier wrote: On 4/19/06, Joost van der Sluis [EMAIL PROTECTED] wrote: Is this a problem with PostrgreSQL itself or the component in lazarus wrapping it? It's a problem of postgres. A transaction 'block' is started with the sql-command 'begin', from that comand on, all queries are executed within that transaction. Using another connection is not possible. Unless, offcourse, you start a new connection. Or closes the transaction (commit, rollback etc) Please pardon me for jumping in the middle of the thread, but your phrase made me really curious. The behaviour you described seems to be the normal one, once you execute begin (transaction) . What other behaviour would someone expect postgres to have ? To allow several concurrent transactions. Is this implemented inside the database engine, as some special SQL commands ? Is it possible to start more transactions simultaneously from firebird's interactive utility?how does one specify that a certain SQL command has to be executed inside one transaction or another ? Interbase/Firebird allows to start several concurrent transactions in 1 connection. AFAIK Oracle and MS-SQL too (named transactions). I'm not sure about this. Oracle has named transactions, but those are just labels that are given to long-running transaction - so that they can be easier identified. Also, in Oracle it is possible that a stored procedure be executed in an 'autonomous' transaction ( i've used this once for writing a procedure that wrote debugging information to a table ; in case of error the messages would have been rolled back unless they were inserted by an autonomous transaction). But i believe that these autonomous transactions are a different beast from the feature we are talking about. This is extremely handy. I understand this. Yet, my feeling is that this feature is an interbase/firebird extension , and that it would be possible to achieve the same by using more standard features like cursors and savepoints. Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] FPC question
On 4/19/06, Joost van der Sluis [EMAIL PROTECTED] wrote: No, pseudo-code, see Michaels mail for the real commands. Yep, I've seen them. Interesting. It's good to know about them . Indeed, it's not visible. Therefore: the same user can see that record in one place, and at the same time he doesn't see the record in another place. Is this truly a good thing ? No. I would use one transaction for one user. This happens in a middle-tier application, i guess. Or you can decide to use one transaction for each form, or one for each thread. That's all up to the developer. I see. Just a last note (maybe this is useful for someone): When using postgresql and there are too many users, it is possible to use connection polling : http://pgpool.projects.postgresql.org/ Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Which distribution to use in order to install lazarus without problems?
On 3/27/06, Mattias Gaertner [EMAIL PROTECTED] wrote: On Mon, 27 Mar 2006 17:48:59 +0200 v.scozzaro '[EMAIL PROTECTED]' [EMAIL PROTECTED] wrote: Which distribution to use in order to install lazarus without problems? It completes of the gtk+ Every distribution I know can be installed without development packages, so there is no distribution without problems. This is the same for every other development software, that is not in the standard packages of the distribution. In Slackware there are no separate devel packages (each package contains both the runtime and the devel) . I haven't tried running Lazarus on Slackware, though. Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Size of Executable on Win32
On 3/17/06, Sergio X [EMAIL PROTECTED] wrote: Hi list. I'm new lazarus user. I think lazarus is a great tool. But I have some questions: 1) On Win32 the executable has 5 - 6 Mb for a simple program (the program don't have any code, only the main window). There are some configuration for reduce the size of the executable? There is a utility (called strip) that you can use to remove the debugging information, which reduces the executable size. You can find information about this here: http://wiki.lazarus.freepascal.org/index.php/File_size_and_smartlinking 2) How can write components? I search in new project menu, but I can´t find the option to start write. I am a newbie, too . Perhaps others can answer you. Cheers, Adrian Maier Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] TProcess and EProcess (probably offtopic)
Hello, My question is probably more suitable for another list. In fact I had asked it on fpc-pascal, but now I am no longer able to post on that list because my mails are rejected by the sorbs spam checker who blacklisted nproxy.gmail.com [64.233.182.207]. Very irritating ... Anyway, here is my problem: I am trying to call other processes with the TProcess class and to detect possible errors with the EProcess exception. The compiler says it doesn't know what EProcess is. try p := TProcess.Create(nil);p.CommandLine := 'psql'; p.Options := p.Options + [poStderrToOutPut,poNewConsole,poWaitOnExit]; p.Execute; except on EProcess do ShowMessage('EProcess !'); end; Michael van Canneyt answered me that i should write : on E : EProcess do ShowMessage('EProcess !'); instead, but the compiler still doesn't recognize EProcess. I have downloaded the fpc 2.0.2 sources and looked for EProcess, but i couldn't find it. Is EProcess a new functionality that doesn't exist in fpc 2.0.2 ? But the FCL manual installed with fpc 2.0.2 says that TProcess.Execute rasies the EProcess exception in case of error ! Please enlighten me where could I find this EProcess exception . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TProcess and EProcess (probably offtopic)
On 3/15/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Wed, 15 Mar 2006, Adrian Maier wrote: Please enlighten me where could I find this EProcess exception . There is an error in the documentation. It should be Exception instead of EProcess. But the implementation needs to be changed to use EProcess, I just anticipated on that when I was writing the docs, and subsequently forgot to change the sources :/ :/ So: use Exception for the moment, but be prepared to change this to EProcess in the future. Ok, I'll do that. Thank you Michael! Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] renaming units
Hello, When creating new units, Lazarus names them Unit1, Unit2, etc. How do i change the names of these units? If i modify at the top of the file unit Unit1; to unit MenuPef;, the compiler says: Error: Illegal unit name: MenuPef. I've also tried to rename the file, but this of course did not work : it complained that the original file cannot be found . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] renaming units
On 3/14/06, Pēteris Bērzs-Bērziņš [EMAIL PROTECTED] wrote: I gess u also should rename unit names in project file and all files witch is using touse untis. Indeed. I had to: - change the name of the unit at the top of the source file - exit Lazarus - rename the files (pas, lfm, lrs) - edit the project file - start Lazarus - fix other compilation errors ( like changing the included file name in the initialization section of the unit ). It's a little messy, but it seems to work just fine. Adrian Maier -Original Message- From: Adrian Maier [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 1:39 PM To: lazarus@miraclec.com Subject: [lazarus] renaming units Hello, When creating new units, Lazarus names them Unit1, Unit2, etc. How do i change the names of these units? If i modify at the top of the file unit Unit1; to unit MenuPef;, the compiler says: Error: Illegal unit name: MenuPef. I've also tried to rename the file, but this of course did not work : it complained that the original file cannot be found . Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] renaming units
On 3/14/06, Mattias Gaertner [EMAIL PROTECTED] wrote: On Tue, 14 Mar 2006 13:38:57 +0200 Adrian Maier [EMAIL PROTECTED] wrote: How do i change the names of these units? Save the unit. The IDE opens a save dialog, where you can choose the name. That dialog appears only the first time , when the unit has just been created ... Or use File - Save as directly. I'll try this the next time. Thanks for the info, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] newbie to lazarus
Hello, I have an application that I plan to convert to lazarus. The application is quite simple: the user is presented a list of options. Based on the user's choice I need to be able to call other programs ( data-entry forms, reports, scripts, etc ). So far I find it quite hard to get up and running. I have seen the tutorials in the wiki and they are ok as a starting point. But I haven't found any reference documentation for the various classes and units. The LCL documentation (work in progress) will be probably someday the kind of documenation i'd like to have available , but unfortunately it's not useful yet because it's just a unit browser with almost no descriptions (yet). So, my question is how do you manage to actually write programs with lazarus with so little documentation? Do you know Delphi's classes already? Are you using some other reference manuals ? At least a list with the most commonly used classes and their description would prove useful. For example: how should someone know when to use TNotebook or TPageControl? What's the difference, since they seem similar when added to a form? What about TTabControl? My intention is not to criticise (it's a project based on volunterr work and I certainly have no right to ask for anything). I'm just trying to get some tips about how and where could I find the details needed to be able to actually use Lazarus for creating new amasing programs. Cheers, Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] newbie to lazarus
On 3/11/06, Graeme Geldenhuys [EMAIL PROTECTED] wrote: If you are converting your application from Delphi, you can use the Delphi help files. If you don't have Delphi, I think you can actually down the help files from the net (sorry can't remember the link, but Google should help). Nope. I'm not converting from Delphi (and i have never programmed in Delphi, actually) . It's a text-mode application based on writeln, textcolor, Crt. Otherwise you can try the Delphi Basics website. It is an excellent site with tons of examples. http://www.delphibasics.co.uk/index.html Your other option, is to look at the Lazarus source (ide directory), to see how things get used. This has worked really well for me. I see. Thanks Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] newbie to lazarus
On 3/11/06, Matthijs Willemstein [EMAIL PROTECTED] wrote: On Sat, 2006-03-11 at 15:34 +0200, Adrian Maier wrote: So, my question is how do you manage to actually write programs with lazarus with so little documentation? Do you know Delphi's classes already? Are you using some other reference manuals ? But the cut a long story short, use Delphi documentation if you cannot figure it out yourself and when you have figured it out, add it to the documentation. Ok, I'll try to get some Delphi reference manuals and see how it goes. Thanks for the answer Adrian Maier _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives