Re: [Lazarus] Problem with revision 28344
On Tuesday 23 November 2010 08:27, tim launchbury wrote: Hello all When updating from svn, applying revision 28344 causes my app to fail with runtime error 202. Is there a problem with this patch or do I need a workround or code change in my app? It worked fine before this change. Update to latest svn, rebuild laz , if you get any error please provide your widgetset, OS etc.. also some stack trace. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] false disk is full messages
Hi, Has anybody else received false Disk is full error messages from Lazarus IDE? Lazarus 0.9.29 r28160 FPC 2.4.3 x86_64-linux-gtk 2 I restarted Lazarus IDE a few times, and the error kept appearing when I try and build my project. Other programs have no problems running or saving information. I even copied a CD ISO image off our server to my system, just to make sure I can write large amounts of data. Rebooting my system resolved the IDE problem, but I still thought it worth mentioning the issue. Clearly the checking for free space code is a bit buggy. My project is located in my $HOME directory, and the /home partition has plenty of space - 18GB to be exact (as the 'df-h' command shows). The root (/) partition also has ample space (8.8GB free). I couldn't have run out of memory either, as I have 4GB in my system, which is more than enough for the applications I had running (JWM, Firefox, Thunderbird and Lazarus IDE) See the Mantis bug report for a screenshot. http://bugs.freepascal.org/view.php?id=18026 PS: I did not want to upgrade my lazarus to a more recent revision (even though it's not that old), because the messages posted in recent days suggest that the 0.9.29 IDE is more unstable than normal, and I finally found a revision which works (more often than not). Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] false disk is full messages
On Tuesday 23 November 2010 09:35, Graeme Geldenhuys wrote: Hi, Has anybody else received false Disk is full error messages from Lazarus IDE? Yes, I see it sometimes for years (but just sometimes).Already asked what it could be and afair somebody said that's something with fpc (but it was really long time ago so cannot remember all details). zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with revision 28344
On Tuesday 23 November 2010 09:33, zeljko wrote: On Tuesday 23 November 2010 08:27, tim launchbury wrote: Hello all When updating from svn, applying revision 28344 causes my app to fail with runtime error 202. Is there a problem with this patch or do I need a workround or code change in my app? It worked fine before this change. Update to latest svn, rebuild laz , if you get any error please provide your widgetset, OS etc.. also some stack trace. Also, provide fpc version. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] false disk is full messages
On Tue, 23 Nov 2010 09:50:48 +0100 zeljko zel...@holobit.net wrote: On Tuesday 23 November 2010 09:35, Graeme Geldenhuys wrote: Hi, Has anybody else received false Disk is full error messages from Lazarus IDE? Yes, I see it sometimes for years (but just sometimes).Already asked what it could be and afair somebody said that's something with fpc (but it was really long time ago so cannot remember all details). See http://lists.freepascal.org/lists/fpc-pascal/2007-October/015301.html Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Carbon: Print out is mirrored
Hi, When I print out over my printing module on Carbon then after second page it starts to print out mirrored where left is with right exchanged. This continues until I restart program. Linux doesn't have any problem. I cannot find any property which could be responsible for this behavior. I know that it must be a conflict between my properties set on printer, but I cannot find which one(s). When I print out anything over TPrinter.Canvas directly I cannot get the same shit. It prints correctly always. Any idea, what can I check? _ffred -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] false disk is full messages
Op 2010-11-23 11:17, Mattias Gaertner het geskryf: See http://lists.freepascal.org/lists/fpc-pascal/2007-October/015301.html I wasn't trying to run my application via the IDE, I was simply trying to recompile/build it using Ctrl+F9 (build). So the issue was not caused by my application, but by Lazarus IDE or FPC. PS: My day-to-day workflow is to code, compile, and then run my app (even GUI apps) from a console window. Debugging via the IDE has never worked well for me, so I don't bother with that any more - I have my own debugging/logging framework I use. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] false disk is full messages
On Tuesday 23 November 2010 10:17, Mattias Gaertner wrote: On Tue, 23 Nov 2010 09:50:48 +0100 zeljko zel...@holobit.net wrote: On Tuesday 23 November 2010 09:35, Graeme Geldenhuys wrote: Hi, Has anybody else received false Disk is full error messages from Lazarus IDE? Yes, I see it sometimes for years (but just sometimes).Already asked what it could be and afair somebody said that's something with fpc (but it was really long time ago so cannot remember all details). See http://lists.freepascal.org/lists/fpc-pascal/2007-October/015301.html Mattias That's it. Tnx :) zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debugging Lazarus IDE (Package access violation)
On Tue, Nov 23, 2010 at 10:26 AM, Paul Ishenin i...@kmiac.ru wrote: 23.11.2010 13:54, Max Vlasov пишет: I suppose I should report an issue, but just wondering, is it hard (if it full reproducible) to run another instance of Lazarus and debug it, so the report could contain more information saving the developers' time? Nothing difficult. Open lazarus.lpi in lazarus and press Run. Better to have RTL compiled with debug info. Thanks, Paul Finally it worked although along the way I managed to solve some problems and set up two instances of Lazarus working at the same comp. By the way, the bug listed as solved ( http://bugs.freepascal.org/view.php?id=17437) probably still exist. Actually the makefiles in the folder \components\lazcontrols are the only one that occasionally contains extra relative up and after that Lazarus down (../../../Lazarus/lcl instead of ../../lcl), so there's no problem for those who have the root compilation folder named accordingly and the one who has it different (mine was LazComp and nearby older lazarus in Lazarus folder, so I got wrong unit version error since lcl in that folder was older-compiled). Should I just leave a note there or issue a new bug? Max Vlasov -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Windows Explorer context menu plug-in with fpc?
Le 22/11/2010 20:30, Bo Berglund a écrit : On Fri, 19 Nov 2010 15:48:07 +0100, Bo Berglund bo.bergl...@gmail.com wrote: On Fri, 19 Nov 2010 07:45:51 -0600, Paul Breneman list2...@brenemanlabs.com wrote: Embarcadero's web site seems to be down at the moment, but there is a little copied from a message on one of there forums from 1 Feb 2010: At http://cc.embarcadero.com/Item/27554 you can find the source code for a shell extension which can be compiled to a 64bit library using Free Pascal / Lazarus. The source code is compatible with Delphi 7 and better, too. If you don't already use www.codenewsfast.com you might search on it for explorer shell extension 64 and you'll find several threads about this. This site found the posting and it is located in newsgroup: embarcadero.public.delphi.thirdpartytools.general I am keeping many of these newsgroups in my Free Agent archive, but unfortunately I did not subscribe to this particular one before, so i need to connect to embarcadero to geth the update and now it seems like they have shut down the site (maybe it is the scheduled server maintenance on Nov 19, 7PM Pacific that has kicked in early?). The post references the link above and it is dead at the moment... Just have to wait, I guess. --- Following reply has been hanging in my out-box for a few days --- I continued my search and lo-and-behold! I found this link: http://www.gnostice.com/nl_article.asp?id=168t=Copy_File_Path_and_Name_using_Windows_Explorer_Context_Menu_Extensions or as tiny: http://tinyurl.com/33yu62g There was explained what position in the registry to use in order to integrate your command to the Explorer context menu. And it works! I have now added UltraEdit and one of my own utilities to the pop-up menu in Explorer. :-D Now I only want to know how to expand this into having a multi-line menu to the right of the pop-up menu. But it looks like there is some hope also here, because there is an example delivered with Delphi7 (and probably also in later versions) in the Demos folder: $DELPHI\Demos\ActiveX\ShellExt This has an example, which I have as yet not opened, on how to make a plug-in dll probably with menus. Of course once embarcadero wakes up I can look at that link too for the FPC compatible code. Do you donwloaded the zip at url I posted herre yesterday ? You have the complete thread as well as the source project. Thierrybo -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debugging Lazarus IDE (Package access violation)
On Tue, 23 Nov 2010 15:04:24 +0300 Max Vlasov max.vla...@gmail.com wrote: On Tue, Nov 23, 2010 at 10:26 AM, Paul Ishenin i...@kmiac.ru wrote: 23.11.2010 13:54, Max Vlasov пишет: I suppose I should report an issue, but just wondering, is it hard (if it full reproducible) to run another instance of Lazarus and debug it, so the report could contain more information saving the developers' time? Nothing difficult. Open lazarus.lpi in lazarus and press Run. Better to have RTL compiled with debug info. Thanks, Paul Finally it worked although along the way I managed to solve some problems and set up two instances of Lazarus working at the same comp. By the way, the bug listed as solved ( http://bugs.freepascal.org/view.php?id=17437) probably still exist. Actually the makefiles in the folder \components\lazcontrols are the only one that occasionally contains extra relative up and after that Lazarus down (../../../Lazarus/lcl instead of ../../lcl), That probably means you are mixing packages from two Lazarus source directories. This is allowed, although in case of lazcontrols this is almost always a bad idea. I'm not sure where to put a warning for this case. so there's no problem for those who have the root compilation folder named accordingly and the one who has it different (mine was LazComp and nearby older lazarus in Lazarus folder, so I got wrong unit version error since lcl in that folder was older-compiled). Should I just leave a note there or issue a new bug? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debugging Lazarus IDE (Package access violation)
On Tue, Nov 23, 2010 at 3:12 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: By the way, the bug listed as solved ( http://bugs.freepascal.org/view.php?id=17437) probably still exist. Actually the makefiles in the folder \components\lazcontrols are the only one that occasionally contains extra relative up and after that Lazarus down (../../../Lazarus/lcl instead of ../../lcl), That probably means you are mixing packages from two Lazarus source directories. This is allowed, although in case of lazcontrols this is almost always a bad idea. I'm not sure where to put a warning for this case. Mattias, you were right, I was too fast at the statement of the bug existence, and it seems that there a reason why this makefiles were changed. Initially I opened lazarus.lpi with lazarus 9.28.2, he showed an error in dividerbevel.pas about overriding non-existent method, after that I saw that it's not a good idea trying to compile new lazarus with an old one and went fpc make way, but it looks like this makefiles were automatically managed by the lazarus, that corrected the pathes, right? So the changes I made in the IDE made this mix possible. I just tried to reproduce it from start and yes, the files are changed right after pressing F9 in the old IDE. The only thing that makes me sad is that there were no save buttons pressed and nevertheless an irreversible change are made to the files (SVN Update no longer download correct versions). I suppose there's no chance for disk-based utilities work other way (for example changing makefile it memory), but can this automatic management be controlled by me in some way? Max Vlasov -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Installing LazReport - 8.0 or 0.9.7 - what version??
2010/8/30 Marcos Douglas m...@delfire.net: On Mon, Aug 30, 2010 at 11:11 AM, Marcos Douglas m...@delfire.net wrote: For the first time I tried to add the package lazreport but I got this error: Unable to load package lazreport ( = 8.00) Steps I did: 1 - I clicked in menu: Package Install/Uninstall packages 2 - select the package lazreport 8.0 3 - I clicked in Install selection and then Save rebuild an IDE ERROR: Unable to load package lazreport ( = 8.00) But... if I open again the Install packages, the package LazReport was renamed to lazreport 0.9.7... and I can install it. Questions: 1 - what is the current version of LazReport? 2 - this is a bug or has something wrong only in my Lazarus? Ah, I use: - WinXP - Laz 0.9.29 - SVN revision 27237 - FPC 2.5.1 Now, I can't reproduce the error with lazreport... but I think the package lazreportpdfexport has the same problem (see attach). See also: http://bugs.freepascal.org/view.php?id=17841 Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Installing LazReport - 8.0 or 0.9.7 - what version??
On Tue, Nov 23, 2010 at 11:42 AM, Vincent Snijders vincent.snijd...@gmail.com wrote: 2010/8/30 Marcos Douglas m...@delfire.net: On Mon, Aug 30, 2010 at 11:11 AM, Marcos Douglas m...@delfire.net wrote: For the first time I tried to add the package lazreport but I got this error: Unable to load package lazreport ( = 8.00) Steps I did: 1 - I clicked in menu: Package Install/Uninstall packages 2 - select the package lazreport 8.0 3 - I clicked in Install selection and then Save rebuild an IDE ERROR: Unable to load package lazreport ( = 8.00) But... if I open again the Install packages, the package LazReport was renamed to lazreport 0.9.7... and I can install it. Questions: 1 - what is the current version of LazReport? 2 - this is a bug or has something wrong only in my Lazarus? Ah, I use: - WinXP - Laz 0.9.29 - SVN revision 27237 - FPC 2.5.1 Now, I can't reproduce the error with lazreport... but I think the package lazreportpdfexport has the same problem (see attach). See also: http://bugs.freepascal.org/view.php?id=17841 Thank you Vincent. Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Installing LazReport - 8.0 or 0.9.7 - what version??
Too many connections on bugtrack website... 2010/11/23 Vincent Snijders vincent.snijd...@gmail.com 2010/8/30 Marcos Douglas m...@delfire.net: On Mon, Aug 30, 2010 at 11:11 AM, Marcos Douglas m...@delfire.net wrote: For the first time I tried to add the package lazreport but I got this error: Unable to load package lazreport ( = 8.00) Steps I did: 1 - I clicked in menu: Package Install/Uninstall packages 2 - select the package lazreport 8.0 3 - I clicked in Install selection and then Save rebuild an IDE ERROR: Unable to load package lazreport ( = 8.00) But... if I open again the Install packages, the package LazReport was renamed to lazreport 0.9.7... and I can install it. Questions: 1 - what is the current version of LazReport? 2 - this is a bug or has something wrong only in my Lazarus? Ah, I use: - WinXP - Laz 0.9.29 - SVN revision 27237 - FPC 2.5.1 Now, I can't reproduce the error with lazreport... but I think the package lazreportpdfexport has the same problem (see attach). See also: http://bugs.freepascal.org/view.php?id=17841 Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Atenciosamente, Alexsander da Rosa Linux User #113925 Extremismo na defesa da liberdade não é defeito. Moderação na busca por justiça não é virtude. -- Barry Goldwater -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] What is a TSQLTransaction and why do I need one?
Before anything else I'd like to say that I'm entirely familiar with transactions in the SQL context. However I've been having a bit of difficulty sorting out the relationship between a TPQConnection, multiple TSQLQuery, and transaction object(s). I'm roughing out a program which I am trying to keep responsive even if getting updated data from the backend using SQL is slow. To do that I've got two TSQLQuery objects, one of which can be queried by code which updates the UI and the other of which will be updated the next time a query is to be run (at which point they'll be swapped). Since this is strictly read-only, I can't see why I need transactions, but I obviously respect the judgment of whoever designed the architecture. Am I correct in my understanding that in order to close the transaction I have to set Action (e.g. to caRollback) and then Active to False? It appears that if I don't do this the query never sees data being updated at the backend. To support the two TSQLQuery objects, do I need one or two TSQLTransaction objects? If I have to have two TSQLTransaction objects, does that imply that I also have to have two TPQConnection objects? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What is a TSQLTransaction and why do I need one?
This was the main reason I gave up on sqldb and moved to Zeos. 2010/11/23 Mark Morgan Lloyd markmll.laza...@telemetry.co.uk Before anything else I'd like to say that I'm entirely familiar with transactions in the SQL context. However I've been having a bit of difficulty sorting out the relationship between a TPQConnection, multiple TSQLQuery, and transaction object(s). I'm roughing out a program which I am trying to keep responsive even if getting updated data from the backend using SQL is slow. To do that I've got two TSQLQuery objects, one of which can be queried by code which updates the UI and the other of which will be updated the next time a query is to be run (at which point they'll be swapped). Since this is strictly read-only, I can't see why I need transactions, but I obviously respect the judgment of whoever designed the architecture. Am I correct in my understanding that in order to close the transaction I have to set Action (e.g. to caRollback) and then Active to False? It appears that if I don't do this the query never sees data being updated at the backend. To support the two TSQLQuery objects, do I need one or two TSQLTransaction objects? If I have to have two TSQLTransaction objects, does that imply that I also have to have two TPQConnection objects? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Atenciosamente, Alexsander da Rosa Linux User #113925 Extremismo na defesa da liberdade não é defeito. Moderação na busca por justiça não é virtude. -- Barry Goldwater -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Windows Explorer context menu plug-in with fpc?
On Tue, 23 Nov 2010 13:07:39 +0100, Thierry B. thierrybotho...@yahoo.fr wrote: At http://cc.embarcadero.com/Item/27554 you can find the source code for a shell extension which can be compiled to a 64bit library using Free Pascal / Lazarus. The source code is compatible with Delphi 7 and better, too. Do you donwloaded the zip at url I posted herre yesterday ? You have the complete thread as well as the source project. Yes, thanks! I also pointed my newsreader to the thirdpartytools.general newsgroup at emarcadero and retrieved all available 27000+ messages incl. bodies... I found the discussion from early 2010 already. I also downloaded the Delphi/Fpc project in the zipfile, so it is now sitting in my PC. Next step is to read up on how I can tell Lazarus to compile for Windows X64 to get the 64 bit version of the DLL... (I'm new to Lazarus) -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to tell lazarus the location of a used package?
On Mon, 22 Nov 2010 18:39:05 +, Martin laza...@mfriebe.de wrote: On 22/11/2010 18:24, Bo Berglund wrote: On Sun, 21 Nov 2010 23:38:42 +, Martinlaza...@mfriebe.de wrote: On 21/11/2010 22:16, Bo Berglund wrote: I have switched to using the SVN version of lazarus. I put it in parallel to the binary distribution lazarus so now I have two of them. and that means you want for at least one of them use (command line param, use windows shortcut / properties ) --primary-config-path=C:\path\to\conf as long as they share the config dir, you may get a lot of oddities... If I do nothing, will they share or not share the config dir? And where is this config dir located? They will share by default. depends on os and os version vista: C:\Users\username\AppData\Local\lazarus linux /home/username/.lazarus Then I don't understand... I have done nothing about the config (since i did not know it existed), so my new SVN version of Lazarus (the fixes branch) should read the same data as the normal lazarus, right? Then the same project opened in both lazarus:es would compile the same way, right? But the original lazarus does not complain about SdpoSerial, but the SVN version does. How come? Is there a dependency on which version of FPC is used? The SVN version also uses the latest *released* FPC version, while the original lazarus uses the FPC delivered in the setup for lazarus on Windows. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Windows Explorer context menu plug-in with fpc?
Bo Berglund wrote: On Tue, 23 Nov 2010 13:07:39 +0100, Thierry B. thierrybotho...@yahoo.fr wrote: At http://cc.embarcadero.com/Item/27554 you can find the source code for a shell extension which can be compiled to a 64bit library using Free Pascal / Lazarus. The source code is compatible with Delphi 7 and better, too. Do you donwloaded the zip at url I posted herre yesterday ? You have the complete thread as well as the source project. Yes, thanks! I also pointed my newsreader to the thirdpartytools.general newsgroup at emarcadero and retrieved all available 27000+ messages incl. bodies... I found the discussion from early 2010 already. I also downloaded the Delphi/Fpc project in the zipfile, so it is now sitting in my PC. Next step is to read up on how I can tell Lazarus to compile for Windows X64 to get the 64 bit version of the DLL... (I'm new to Lazarus) Just a thought, but I don't think you need to go to all that bother. The example code on the embarcadero site doesn't seem to require Lazarus. It just uses a Windows MessageBox for the dialog in the example. I could be wrong but I think a 64 bit FPC compiler is all you need. Would you be interested in maybe helping me just a little to make a 64-bit FPC minimal distro that would compile that example code? I've been using more Linux and less Windows the past few years so right now I don't have a 64 bit Windows to test with. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What is a TSQLTransaction and why do I need one?
On Tue, 2010-11-23 at 16:01 +, Mark Morgan Lloyd wrote: Before anything else I'd like to say that I'm entirely familiar with transactions in the SQL context. However I've been having a bit of difficulty sorting out the relationship between a TPQConnection, multiple TSQLQuery, and transaction object(s). In the case of Postgres it's a little bit hard to understand, because the transaction-paradigm of Firebird/Interbase is used. Postgres' transaction can be used in this manner, but you have to know how. I'm roughing out a program which I am trying to keep responsive even if getting updated data from the backend using SQL is slow. To do that I've got two TSQLQuery objects, one of which can be queried by code which updates the UI and the other of which will be updated the next time a query is to be run (at which point they'll be swapped). Since this is strictly read-only, I can't see why I need transactions, but I obviously respect the judgment of whoever designed the architecture. Well, you always need a transaction. Without a transaction, Postgres will do nothing, ever. I assume you are used to the fact that postgres automatically creates an transaction for you. With Sqldb you have to do this yourself. Am I correct in my understanding that in order to close the transaction I have to set Action (e.g. to caRollback) and then Active to False? It appears that if I don't do this the query never sees data being updated at the backend. To close the transaction, use .commit or .rollback. (In your case .rollback) That the query isn't updated, isn't that because it's cached? Did you close and reopened the query? If that does not help, you have to set the proper transaction-properties, so that it can read data committed in other transactions. To support the two TSQLQuery objects, do I need one or two TSQLTransaction objects? If I have to have two TSQLTransaction objects, does that imply that I also have to have two TPQConnection objects? Just one. Joost. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What is a TSQLTransaction and why do I need one?
Joost van der Sluis wrote: On Tue, 2010-11-23 at 16:01 +, Mark Morgan Lloyd wrote: Before anything else I'd like to say that I'm entirely familiar with transactions in the SQL context. However I've been having a bit of difficulty sorting out the relationship between a TPQConnection, multiple TSQLQuery, and transaction object(s). Since this is strictly read-only, I can't see why I need transactions, but I obviously respect the judgment of whoever designed the architecture. Well, you always need a transaction. Without a transaction, Postgres will do nothing, ever. I assume you are used to the fact that postgres automatically creates an transaction for you. With Sqldb you have to do this yourself. Just got there- I'd forgotten that one :-) Am I correct in my understanding that in order to close the transaction I have to set Action (e.g. to caRollback) and then Active to False? It appears that if I don't do this the query never sees data being updated at the backend. To close the transaction, use .commit or .rollback. (In your case .rollback) That the query isn't updated, isn't that because it's cached? Did you close and reopened the query? Yes, I was always seeing the same data until I started forcibly closing the transaction. When I queried server statistics I could see that the same transaction had been active for an extended period, and when running manual tests (using the psql utility) I determined that that was the way that PostgreSQL behaved. If that does not help, you have to set the proper transaction-properties, so that it can read data committed in other transactions. To support the two TSQLQuery objects, do I need one or two TSQLTransaction objects? If I have to have two TSQLTransaction objects, does that imply that I also have to have two TPQConnection objects? Just one. Thanks, working on it. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Installing LazReport - 8.0 or 0.9.7 - what version??
Hello Lazarus-List, Tuesday, November 23, 2010, 4:53:46 PM, you wrote: AR Too many connections on bugtrack website... Or worst: Database query failed. Error received from database was #145: Table './bugtracker/mantis_bug_table' is marked as crashed and should be repaired for the query: SELECT * FROM mantis_bug_table WHERE id='15582' -- Best regards, José -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What is a TSQLTransaction and why do I need one?
I think the statement without a transaction, Postgres will do nothing, ever. For example: you can write a small C program using libpq that executes a simple SELECT without any transaction SQL code. Here's a comment from PostgreSQL's website [1]: /* * Our test case here involves using a cursor, for which we must be inside * a transaction block. We could do the whole thing with a single * PQexec() of select * from pg_database, but that's too trivial to make * a good example. */ Been there, done that. I've been programming C + libpq for almost a decade now. There's another example at another website that do not use transactions at all: http://momjian.us/main/writings/pgsql/writing_apps/ [1] http://www.postgresql.org/docs/current/static/libpq-example.html 2010/11/23 Joost van der Sluis jo...@cnoc.nl Well, you always need a transaction. Without a transaction, Postgres will do nothing, ever. I assume you are used to the fact that postgres automatically creates an transaction for you. With Sqldb you have to do this yourself. -- Atenciosamente, Alexsander da Rosa Linux User #113925 Extremismo na defesa da liberdade não é defeito. Moderação na busca por justiça não é virtude. -- Barry Goldwater -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What is a TSQLTransaction and why do I need one?
On Tuesday, 23. November 2010 18.01:35 Alexsander Rosa wrote: I think the statement without a transaction, Postgres will do nothing, ever. For example: you can write a small C program using libpq that executes a simple SELECT without any transaction SQL code. Here's a comment [...] It uses an implicit transaction. MSEgui version of tsqltransaction has the flag tao_fake in options property which enables implicit transactions for database connections which support them, for Firebird it is not supported. MSEgui version of tsqldataset has the flag dso_offline which disconnects from transaction after loading the data. It is possible to reconnect in order to write the update packages to database. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to tell lazarus the location of a used package?
On Tue, 23 Nov 2010 17:34:07 +0100, Sven Barth pascaldra...@googlemail.com wrote: Then I don't understand... I have done nothing about the config (since i did not know it existed), so my new SVN version of Lazarus (the fixes branch) should read the same data as the normal lazarus, right? Then the same project opened in both lazarus:es would compile the same way, right? But the original lazarus does not complain about SdpoSerial, but the SVN version does. How come? Is there a dependency on which version of FPC is used? The SVN version also uses the latest *released* FPC version, while the original lazarus uses the FPC delivered in the setup for lazarus on Windows. Did you use the pcp parameter as I've suggested you? If so, then you've two different configuration directories (which is the saver way regarding continued use of the release version - in my opinion). Spot-on! I had put the --pcp parameter in the shortcut that starts the lazarus instances. I now have a config dir inside the program main folder for each version. But I copied the data from the original place into both (I think) first. Anyway, now I understand what is going on and the package is recognized. Thanks! -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to tell lazarus the location of a used package?
On Tue, 23 Nov 2010 19:54:23 +0100, Bo Berglund bo.bergl...@gmail.com wrote: Anyway, now I understand what is going on and the package is recognized. Well, I was a bit premature. I now looked in the config dirs and located the packagefiles.xml files and had a look inside. This is what I found: Original Lazarus config: Item7 Name Value=SdpoSerialLaz/ Version Minor=1 Release=4/ Filename Value=C:\Programs\lazarus\components\sdpo\sdposeriallaz.lpk/ /Item7 New SVN version from the fixes branch: Item6 Name Value=SdpoSerialLaz/ Version Minor=1 Release=4/ Filename Value=components\Sdpo\sdposeriallaz.lpk/ /Item6 Why is one Lazarus using a relative path and the other an absolute path? Bo Berglund -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What is a TSQLTransaction and why do I need one?
Martin Schreiber wrote: On Tuesday, 23. November 2010 18.01:35 Alexsander Rosa wrote: I think the statement without a transaction, Postgres will do nothing, ever. For example: you can write a small C program using libpq that executes a simple SELECT without any transaction SQL code. Here's a comment [...] It uses an implicit transaction. MSEgui version of tsqltransaction has the flag tao_fake in options property which enables implicit transactions for database connections which support them, for Firebird it is not supported. MSEgui version of tsqldataset has the flag dso_offline which disconnects from transaction after loading the data. It is possible to reconnect in order to write the update packages to database. Thanks Martin, noted. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Reading std::ostream from dll
Hi, I'm working with a dll/so created with C++, that has a function which fills an std::ostream, and I need to read it from a FreePascal app using a buffer or TStream. The C++ method is similar to this: void myClass::getOutputData(ostream out); I wrapped it to be readable from FPC as this: ... extern C{ void getMyOutputData(void * myInstance, void * stream){ myClass * lInstance = (myClass *)myInstance; lInstance-getOutputData(stream); } } ... Is there a way to read std::ostream from FPC? thanks in advance, -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Property TComponent.Tag change
Hi, To remain compatible with the upcoming Delphi 64-bit release, I've changed the 'Tag' property type from Integer - PtrInt. The practical upshot from this is that you can store a pointer in it on all platforms. (a widespread abuse of the Tag property). This potentially breaks some existing code if you rely on Tag having a size of 4 bytes. If you do not rely on this, it should not break any code. If it does, I'd be interested in hearing about it so we can provide workarounds on the website. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is there a Lazarus component that allows setting of visual properties at runtime and saving them?
On Tue, 23 Nov 2010, Frank Church wrote: Is there a Lazarus component that allows setting of visual properties at runtime and saving them? I am thinking along the lines of the Object Debugger component by Marco Cantu Install the RunTimeTypeInfoControls package. It contains (amongst others) the Object Inspector grid. If you want to saverestore properties, you can set them in the Form.SessionProperties property of the form, and drop a TIniPropStorage or TXMLpropStorage from the 'Misc' tab on the form, and they will be saved and restored at runtime. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Property TComponent.Tag change
Michael Van Canneyt escreveu: Hi, To remain compatible with the upcoming Delphi 64-bit release, I've changed the 'Tag' property type from Integer - PtrInt. Do you already has the info that Delphi will do this change? Luiz The practical upshot from this is that you can store a pointer in it on all platforms. (a widespread abuse of the Tag property). This potentially breaks some existing code if you rely on Tag having a size of 4 bytes. If you do not rely on this, it should not break any code. If it does, I'd be interested in hearing about it so we can provide workarounds on the website. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] object casting to pointer
Hi. I'm working witha TTreeview, and trying to assign a object to a TTreeNode.data property: code MyTreeNode := myTreeview.add(nil, MyTreeNode); // any TObject descendant class MyObject = MyClass.Create(); // all of these, generate a syntax/semantic error: // no typecasting MyTreeNode.Data := MyObject; // typecasting lowercase MyTreeNode.Data := pointer(MyObject); // typecasting capital MyTreeNode.Data := Pointer(MyObject); // typecasting with address operator MyTreeNode.Data := pointer(@MyObject); /code But none of them seems to work. I already search in the wiki. Any idea, what is missing ? Thanks. stardev tod maramirezc ta gmail tod com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] object casting to pointer
On 2010-11-23 15:41:20 -0600, Marco Aurelio Ramirez Carrillo wrote: Hi. I'm working witha TTreeview, and trying to assign a object to a TTreeNode.data property: code MyTreeNode := myTreeview.add(nil, MyTreeNode); // any TObject descendant class MyObject = MyClass.Create(); // all of these, generate a syntax/semantic error: // no typecasting MyTreeNode.Data := MyObject; // typecasting lowercase MyTreeNode.Data := pointer(MyObject); // typecasting capital MyTreeNode.Data := Pointer(MyObject); // typecasting with address operator MyTreeNode.Data := pointer(@MyObject); /code But none of them seems to work. I already search in the wiki. Any idea, what is missing ? Thanks. stardev tod maramirezc ta gmail tod com I did a quick test using this: TreeView1.Items[0].Data := @MyObject; And it compiled without problem. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to tell lazarus the location of a used package?
On Tue, 23 Nov 2010 20:03:26 +0100 Bo Berglund bo.bergl...@gmail.com wrote: On Tue, 23 Nov 2010 19:54:23 +0100, Bo Berglund bo.bergl...@gmail.com wrote: Anyway, now I understand what is going on and the package is recognized. Well, I was a bit premature. I now looked in the config dirs and located the packagefiles.xml files and had a look inside. This is what I found: Original Lazarus config: Item7 Name Value=SdpoSerialLaz/ Version Minor=1 Release=4/ Filename Value=C:\Programs\lazarus\components\sdpo\sdposeriallaz.lpk/ /Item7 New SVN version from the fixes branch: Item6 Name Value=SdpoSerialLaz/ Version Minor=1 Release=4/ Filename Value=components\Sdpo\sdposeriallaz.lpk/ /Item6 Why is one Lazarus using a relative path and the other an absolute path? 0.9.29 uses relative paths for packages in the Lazarus source directory. When a new Lazarus is installed under a different path (e.g. the path contains the Lazarus version) all new packages are used automatically. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] object casting to pointer
On Tue, 23 Nov 2010 15:41:20 -0600 Marco Aurelio Ramirez Carrillo stardev.mrami...@gmail.com wrote: Hi. I'm working witha TTreeview, and trying to assign a object to a TTreeNode.data property: code MyTreeNode := myTreeview.add(nil, MyTreeNode); // any TObject descendant class MyObject = MyClass.Create(); // all of these, generate a syntax/semantic error: // no typecasting MyTreeNode.Data := MyObject; This works here. Please provide a more complete example. // typecasting lowercase MyTreeNode.Data := pointer(MyObject); // typecasting capital MyTreeNode.Data := Pointer(MyObject); // typecasting with address operator Pascal types are case insensitive. MyTreeNode.Data := pointer(@MyObject); Simply wrong. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Carbon: Print out is mirrored
On Tue, Nov 23, 2010 at 4:32 AM, Fred Flinestone ffre...@gmail.com wrote: When I print out over my printing module on Carbon then after second page it starts to print out mirrored where left is with right exchanged. This continues until I restart program. Linux doesn't have any problem. Is it reproducible on Print to PDF printer? thanks, Dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Property TComponent.Tag change
On Tue, 23 Nov 2010, Luiz Americo Pereira Camara wrote: Michael Van Canneyt escreveu: Hi, To remain compatible with the upcoming Delphi 64-bit release, I've changed the 'Tag' property type from Integer - PtrInt. Do you already has the info that Delphi will do this change? Yes. Marco Van De Voort got it from somewhere. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] object casting to pointer
On Tue, 23 Nov 2010, Marco Aurelio Ramirez Carrillo wrote: Hi. I'm working witha TTreeview, and trying to assign a object to a TTreeNode.data property: code MyTreeNode := myTreeview.add(nil, MyTreeNode); // any TObject descendant class MyObject = MyClass.Create(); // all of these, generate a syntax/semantic error: // no typecasting MyTreeNode.Data := MyObject; I do this every day ? What is the error you get ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Property TComponent.Tag change
On 2010-11-24 01:21, Michael Van Canneyt wrote: On Tue, 23 Nov 2010, Luiz Americo Pereira Camara wrote: Michael Van Canneyt escreveu: Hi, To remain compatible with the upcoming Delphi 64-bit release, I've changed the 'Tag' property type from Integer - PtrInt. Do you already has the info that Delphi will do this change? Yes. Marco Van De Voort got it from somewhere. It was announced here: http://twitter.com/kylix_rd Be ready for 64 bit: In Delphi XE, this Component.Tag := NativeInt(Self); will just recompile in 64 bit. 11:08 PM Nov 2nd http://twitter.com/kylix_rd/status/29505442761 via TweetDeck http://www.tweetdeck.com Regards Žilvinas Ledas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Carbon: Print out is mirrored
On Tue, Nov 23, 2010 at 4:32 AM, Fred Flinestone ffre...@gmail.com wrote: Any idea, what can I check? Also, you need to check how you're handling Context translation, if you're using Carbon API (CGContext) for printing. If you're not, then you'd better to refer to the known bugs of the library you're using. thanks, dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] GUI development for web UI
Hello List, Well I know about the framework fur Javascript library in Lazarus, but I'm thinking in the past year or so, what will it take to design a gui application using Lazarus, and make it work like a web app that act the same as the desktop version, without any specific components for it. Then today I found the following link: http://blogs.gnome.org/alexl/2010/11/23/gtk3-vs-html5/ and it looks like someone made something like that on GTK3. The problem is that I do not have the time to do it myself (or I would have created at least the start for it), what will it take to create something like that for Lazarus that is not dependent on the widgets (it will not care if it's GTK, Qt, WinAPI etc..), and take also 3rd party components for it ? Thanks, Ido LINESIP websites: http://www.linesip.com http://www.linesip.co.il -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus