Re: [Lazarus] old problem on FreeBSD: ld cannot find -lc_r
On Fri, 19 Jul 2013 04:34:34 +0200 Marc Santhoff m.santh...@web.de wrote: Hi, after unpacking the brand new lazarus 1.0.10 and compiling it anything works fine. The next step was to install the lazreport package into the IDE. Compilation worked up to the linking process: /usr/bin/ld: cannot find -lc_r lazarus.pp(135) Error: Error while linking lazarus.pp(135) Fatal: There were 1 errors compiling module, stopping This is pretty old and I had this once while FreeBSD was swapping one threading library for another. Nowadays -lc_r is unsupported AFAIK and one should use -lpthread instead. The default widgetset on FreeBSD is gtk2. The gtk2int.pp has {$linklib pthread}. I have searched lazarus' Makefiles, my personal configuration in .lazarus and checked there is no mapping file for the linker messing things up. The fpc.cfg seems to be fine (an unaltered by me) too. Where does this come from? I guess from one of the fpc units. Where should I search to find the error? You can grep for linklib directives in the sources. And you can use the ppudump tool on all .ppu files and grep for c_r. TIA, Marc FreeBSD 9.1-STABLE amd64 fpc 2.6.0 lazarus 1.0.10 Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memo for touchscreen
Op 18-07-13 17:32, waldo kitty schreef: On 7/18/2013 07:54, Koenraad Lelong wrote: whatever you choose, you appear to need at least some sort of on-screen keyboard component like some (so-called) smartphones have... Waldo, I was working on that. I also thought of virtual keyboards, but then the problem arises how to invoke these. I mean, most of the time I don't need a keyboard. But when I need it, how do I pop it up ? Could be as simple as calling the application's name, but then how do I remove it ? I need to study and try. The simplest thing seems making my own virtual keyboard. Regards, Koenraad Lelong -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with TSQLScript
On 18/07/2013 17:40, Paul wrote: I have problem with TSQLScript (?) Script looks like that SET TERM ^ ; CREATE PROCEDURE GET_USER_PRIVILEGES ( USER_ACCOUNT VARCHAR(10)) RETURNS ( RESULT CHAR(1)) AS BEGIN FOR SELECT DISTINCT RDB$PRIVILEGE FROM RDB$USER_PRIVILEGES WHERE (RDB$USER = :USER_ACCOUNT) INTO :RESULT DO BEGIN SUSPEND; END END ^ SET TERM ; ^ and the error message looks like that {...}PrepareStatement -Dynamic SQL Error -SQL Error Code = -104 Token unknown - line 11, column 11 -? line 11 - INTO :RESULT column 11- : FlameRobin does not have any problems with this piece of code Any hints ? Paul I use Lazarus 1.0.10, Firebird 2.5 on Ubuntu 32bit Not really, except it's a Firebird error and it would be interested to know what actually gets passed to the Firebird engine (to verify if that runs in FlameRobin). Perhaps sqldb logging [1] would work for that? [1] http://wiki.lazarus.freepascal.org/SqlDBHowto#Troubleshooting:_TSQLConnection_logging -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with TSQLScript
On 07/18/2013 05:40 PM, Paul wrote: Hello, I have problem with TSQLScript (?) Script looks like that SET TERM ^ ; CREATE PROCEDURE GET_USER_PRIVILEGES ( USER_ACCOUNT VARCHAR(10)) RETURNS ( RESULT CHAR(1)) AS BEGIN FOR SELECT DISTINCT RDB$PRIVILEGE FROM RDB$USER_PRIVILEGES WHERE (RDB$USER = :USER_ACCOUNT) INTO :RESULT DO BEGIN SUSPEND; END END ^ SET TERM ; ^ and the error message looks like that {...}PrepareStatement -Dynamic SQL Error -SQL Error Code = -104 Token unknown - line 11, column 11 -? line 11 - INTO :RESULT column 11- : FlameRobin does not have any problems with this piece of code Any hints ? I think you have to set TSQLScript.UseSetTerm:=true. TSQLScript is parsing the script and executes queries one by one and needs to know what the real terminator is. http://www.freepascal.org/docs-html/fcl/sqldb/tsqlscript.usesetterm.html Ludo -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with TSQLScript
W dniu 19.07.2013 10:48, Ludo Brands pisze: On 07/18/2013 05:40 PM, Paul wrote: Hello, I have problem with TSQLScript (?) Script looks like that SET TERM ^ ; CREATE PROCEDURE GET_USER_PRIVILEGES ( USER_ACCOUNT VARCHAR(10)) RETURNS ( RESULT CHAR(1)) AS BEGIN FOR SELECT DISTINCT RDB$PRIVILEGE FROM RDB$USER_PRIVILEGES WHERE (RDB$USER = :USER_ACCOUNT) INTO :RESULT DO BEGIN SUSPEND; END END ^ SET TERM ; ^ and the error message looks like that {...}PrepareStatement -Dynamic SQL Error -SQL Error Code = -104 Token unknown - line 11, column 11 -? line 11 - INTO :RESULT column 11- : FlameRobin does not have any problems with this piece of code Any hints ? I think you have to set TSQLScript.UseSetTerm:=true. TSQLScript is parsing the script and executes queries one by one and needs to know what the real terminator is. http://www.freepascal.org/docs-html/fcl/sqldb/tsqlscript.usesetterm.html Ludo -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus UseSetTerm is set to TRUE and Terminator to ; Without SET TERM directive in the script and terminator set to ^ result is the same :( I tested other similar procedures, every time problem is somewhere around INTO :VARIABLE in the procedure code. Paul -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with TSQLScript
W dniu 19.07.2013 09:38, Reinier Olislagers pisze: On 18/07/2013 17:40, Paul wrote: I have problem with TSQLScript (?) Script looks like that SET TERM ^ ; CREATE PROCEDURE GET_USER_PRIVILEGES ( USER_ACCOUNT VARCHAR(10)) RETURNS ( RESULT CHAR(1)) AS BEGIN FOR SELECT DISTINCT RDB$PRIVILEGE FROM RDB$USER_PRIVILEGES WHERE (RDB$USER = :USER_ACCOUNT) INTO :RESULT DO BEGIN SUSPEND; END END ^ SET TERM ; ^ and the error message looks like that {...}PrepareStatement -Dynamic SQL Error -SQL Error Code = -104 Token unknown - line 11, column 11 -? line 11 - INTO :RESULT column 11- : FlameRobin does not have any problems with this piece of code Any hints ? Paul I use Lazarus 1.0.10, Firebird 2.5 on Ubuntu 32bit Not really, except it's a Firebird error and it would be interested to know what actually gets passed to the Firebird engine (to verify if that runs in FlameRobin). Perhaps sqldb logging [1] would work for that? [1] http://wiki.lazarus.freepascal.org/SqlDBHowto#Troubleshooting:_TSQLConnection_logging -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus Only TSQLScript.OnException is triggered with error message as above I don't know why but TIBConnection.OnLog event isn't triggered at all (even when TSQLScript.OnException is not assigned) Paul -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with TSQLScript
W dniu 19.07.2013 10:48, Ludo Brands pisze: On 07/18/2013 05:40 PM, Paul wrote: Hello, I have problem with TSQLScript (?) Script looks like that SET TERM ^ ; CREATE PROCEDURE GET_USER_PRIVILEGES ( USER_ACCOUNT VARCHAR(10)) RETURNS ( RESULT CHAR(1)) AS BEGIN FOR SELECT DISTINCT RDB$PRIVILEGE FROM RDB$USER_PRIVILEGES WHERE (RDB$USER = :USER_ACCOUNT) INTO :RESULT DO BEGIN SUSPEND; END END ^ SET TERM ; ^ and the error message looks like that {...}PrepareStatement -Dynamic SQL Error -SQL Error Code = -104 Token unknown - line 11, column 11 -? line 11 - INTO :RESULT column 11- : FlameRobin does not have any problems with this piece of code Any hints ? I think you have to set TSQLScript.UseSetTerm:=true. TSQLScript is parsing the script and executes queries one by one and needs to know what the real terminator is. http://www.freepascal.org/docs-html/fcl/sqldb/tsqlscript.usesetterm.html Ludo TSQLScript.OnException Exception.Message shows statement to run like this (without any terminator) CREATE PROCEDURE GET_USER_PRIVILEGES ( USER_ACCOUNT VARCHAR(10)) RETURNS ( RESULT CHAR(1)) AS BEGIN FOR SELECT DISTINCT RDB$PRIVILEGE FROM RDB$USER_PRIVILEGES WHERE (RDB$USER = :USER_ACCOUNT) INTO :RESULT DO BEGIN SUSPEND; END END Paul -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [solved] old problem on FreeBSD: ld cannot find -lc_r
Am Freitag, den 19.07.2013, 08:05 +0200 schrieb Mattias Gaertner: On Fri, 19 Jul 2013 04:34:34 +0200 Marc Santhoff m.santh...@web.de wrote: Where does this come from? I guess from one of the fpc units. Got a frsh 2.6.2, but that didn't help as expected. Where should I search to find the error? You can grep for linklib directives in the sources. And you can use the ppudump tool on all .ppu files and grep for c_r. This helped me thinking. The error must come from one of the installed ide packages if a clean IDE compiles. So I started kicking out all custom packages and the error is gone. I'll go fixing those now. Thank you! Marc -- Marc Santhoff m.santh...@web.de -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memo for touchscreen
Op 18-07-13 21:24, Malcolm Poole schreef: procedure TForm1.LetterAButtonClick ( Sender: TObject ) ; var testcaretpos: Integer; begin testcaretpos := Memo1.SelStart; Memo1.Text := Copy(Memo1.Text, 1, testcaretpos) + 'A' + Copy(Memo1.Text, testcaretpos+1, MaxInt); Inc(testcaretpos); Memo1.SelStart := testcaretpos; Memo1.SetFocus; end; procedure TForm1.DeleteButtonClick ( Sender: TObject ) ; var testcaretpos: Integer; begin testcaretpos := Memo1.SelStart; Memo1.Text := Copy(Memo1.Text, 1, testcaretpos) + Copy(Memo1.Text, testcaretpos+2, MaxInt); Memo1.SelStart := testcaretpos; Memo1.SetFocus; end; Thanks, Works fine, except for navigating up and down. Left and right is OK, I have to find out how to know on what line the cursor is, and then going to the next/previous line, if possible. regards, Koenraad Lelong. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memo for touchscreen
On 19/07/13 13:45, Koenraad Lelong wrote: Works fine, except for navigating up and down. Left and right is OK, I have to find out how to know on what line the cursor is, and then going to the next/previous line, if possible. Well I did say it was only to get you started :D Memo1.CursorPos.y will tell you on which line the cursor is. Here's a suggestion for navigating to the line above. I'll leave it to you to work out how to navigate to the line below. Malcolm == procedure TForm1.UpButtonClick ( Sender: TObject ) ; var newcaretPos: Integer; x: Integer; begin newcaretPos := 0; writeln(Memo1.CaretPos.Y, #32, Memo1.CaretPos.X); for x := 0 to Memo1.CaretPos.Y-2 do newcaretPos := newcaretPos + Length(Memo1.Lines[x]) + Length(LineEnding); if Length(Memo1.Lines[Memo1.CaretPos.Y-1]) Memo1.CaretPos.X then newcaretPos := newcaretPos + Length(Memo1.Lines[Memo1.CaretPos.Y-1]) + 1 else newcaretPos := newcaretpos + Memo1.CaretPos.X; Memo1.SelStart := newcaretPos; Memo1.SetFocus; end; -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus, Jedi etc.
On 18 July 2013 14:46, Paulo Costa paco.mail.telepac...@gmail.com wrote: On 18/07/2013 14:31, Kenneth Cochran wrote: On Thu, Jul 18, 2013 at 6:23 AM, Reimar Grabowski reimg...@web.de mailto:reimg...@web.de wrote: On Wed, 17 Jul 2013 11:17:29 +0200 Reinier Olislagers reinierolislag...@gmail.com mailto:reinierolislagers@**gmail.com reinierolislag...@gmail.com wrote: Regardless, I don't think prolonging this thread is very useful. +1 I invoke Godwin's law. You're all a bunch of Hilter lovin' Nazis. There, that should kill the thread. Unfortunately, no... From wikipedia: http://en.wikipedia.org/wiki/**Godwin%27s_lawhttp://en.wikipedia.org/wiki/Godwin%27s_law It is considered poor form to raise such a comparison arbitrarily with the motive of ending the thread. There is a widely recognized corollary that any such ulterior-motive invocation of Godwin's law will be unsuccessful.[8] I apologize for going so much off topic, Paulo Costa -- __**_ Lazarus mailing list Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus There is nothing particularly wrong with MySQL. Together with its partner in crime PHP they were hacks their developers put together to make things easy for their developers and they caught on quickly in the early days of the web. They just outgrew their intended usage (good enough) and once their installed base grew it became difficult and expensive to enforce compliance without breaking existing applications. When you know that MySQL was developed from an even earlier toy database called msql you will understand. Just Google some of the debates surrounding them in their early days when Monty Widenius or( was it David Axmark) said something like ACID compliance was not necessary in an RDBMS or MySQL was ACID compliant or some other such tripe to understand why MySQL is the way it is. At that time PostgreSQL was at the 6.5 or so level and MySQL ran rings round it in ease of installability and performance. You just had to copy the files from one place to another and off you went. Try doing that with PostgreSQL. MySQL also worked very well with Windows which was a bonus. It just couldn't be beaten for ease of deployment. Consider that most of the other database cost a bomb in licensing and you can see why MySQL became so popular. It was such a doddle to use. Compare MySQL's command line tools to those of PostgreSQL or Firebird's command line tools and you will see why MySQL became so popular. Did I mention the licensing issue? -- Frank Church === http://devblog.brahmancreations.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memo for touchscreen
On 7/19/2013 03:19, Koenraad Lelong wrote: Op 18-07-13 17:32, waldo kitty schreef: On 7/18/2013 07:54, Koenraad Lelong wrote: whatever you choose, you appear to need at least some sort of on-screen keyboard component like some (so-called) smartphones have... Waldo, I was working on that. I also thought of virtual keyboards, but then the problem arises how to invoke these. I mean, most of the time I don't need a keyboard. But when I need it, how do I pop it up ? Could be as simple as calling the application's name, but then how do I remove it ? I need to study and try. The simplest thing seems making my own virtual keyboard. i would think that a button on the main interface that one could tap to bring up the virtual keyboard would be the way to go... then tap that same button to hide the virtual keyboard again... that's likely what i would do if i were in your position... that also based on what little i've interfaced with the two (so-called) smartphones i've ever held for any length of time ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus