Re: [Lazarus] Sending messages

2011-11-25 Thread zeljko
On Saturday 26 of November 2011 07:45:36 Felipe Monteiro de Carvalho wrote: > On Fri, Nov 25, 2011 at 2:33 PM, Hans-Peter Diettrich > > wrote: > >>> This doesn't answer my question. What's the *source* of the processed > >>> messages? > > > > And how does PostMessage fit into the picture? > > I

Re: [Lazarus] Postgres and Lazarus

2011-11-25 Thread zeljko
On Friday 25 of November 2011 20:15:26 Everton Vieira wrote: > Hi people, anyone uses the combination of Postgres with Lazarus? > > I've been gotting a lot of problems with it: > > To create or drop database. > To create or drop schema. > To create or drop table. > To create or drop index. > > O

Re: [Lazarus] Sending messages

2011-11-25 Thread Felipe Monteiro de Carvalho
On Fri, Nov 25, 2011 at 2:33 PM, Hans-Peter Diettrich wrote: >>> This doesn't answer my question. What's the *source* of the processed >>> messages? > And how does PostMessage fit into the picture? If this is for writing documentation, then you are clearly on the wrong track here. Libraries work

Re: [Lazarus] FontCanUTF8(Font: HFont)

2011-11-25 Thread Felipe Monteiro de Carvalho
You have to read the implementations to see what the routines do, and in this case it looks pretty clear that it is a legacy introduced because LCL-gtk1 needed it. It probably can be deprecated. function TGTKWidgetSet.FontCanUTF8(Font: HFont): boolean; begin Result:=IsValidGDIObject(Font) {

Re: [Lazarus] Build project now rebuilds everithing

2011-11-25 Thread cobines
W dniu 2011-11-06 19:08, cobines pisze: However, weird thing. If I choose Build from menu then it doesn't seem to rebuild FCL, LCL, but if I start Build from a hotkey then it does. The call from menu item is: procedure TMainIDE.mnuBuildProjectClicked(Sender: TObject); Begin DoBuildProject(cr

Re: [Lazarus] Sending messages

2011-11-25 Thread Mattias Gaertner
On Fri, 25 Nov 2011 22:57:34 +0100 Hans-Peter Diettrich wrote: > zeljko schrieb: > > On Friday 25 of November 2011 14:33:16 Hans-Peter Diettrich wrote: > > > > > > > And how does PostMessage fit into the picture? > > > > > > I'm using PostMessage in an audio application to update position of

Re: [Lazarus] Sending messages

2011-11-25 Thread Hans-Peter Diettrich
zeljko schrieb: On Friday 25 of November 2011 14:33:16 Hans-Peter Diettrich wrote: > And how does PostMessage fit into the picture? I'm using PostMessage in an audio application to update position of trackbar on mainform from another thread where audio file is loaded and playing and it wor

[Lazarus] FontCanUTF8(Font: HFont)

2011-11-25 Thread Hans-Peter Diettrich
How is a *font* involved in UTF-8 encoding? IMO IsUnicodeFont would be a better name. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] SetScrollInfo

2011-11-25 Thread Hans-Peter Diettrich
Hans-Peter Diettrich schrieb: TWin32WidgetSet.SetScrollInfo modifies the content of the ScrollInfo ScrollInfo.nMax := Max(ScrollInfo.nMin, ScrollInfo.nMax - 1); i.e. nMax is typically decremented by 1, with *every* new call! It looks like this is only a wrong implementation of the constrain

[Lazarus] Postgres and Lazarus

2011-11-25 Thread Everton Vieira
Hi people, anyone uses the combination of Postgres with Lazarus? I've been gotting a lot of problems with it: To create or drop database. To create or drop schema. To create or drop table. To create or drop index. Occurs erros. Specialy on Linux they happen. They aren't able to do this functions

Re: [Lazarus] SynEdit - SelStart/SelEnd - bug

2011-11-25 Thread silvioprog
2011/11/25 Martin : > On 25/11/2011 14:48, silvioprog wrote: >> >> Hi, >> >> Please see in: http://bugs.freepascal.org/view.php?id=20750 >> >> Thx. >> > See comment on the issue, Selection is correct. > > Though SelStart moves the caret to the start position. It may be better to > have it at SelEnd

Re: [Lazarus] Class TThread in linux;

2011-11-25 Thread William Oliveira Ferreira
Thanks, now became more clear William de Oliveira Ferreira Bacharel em Sistemas de Informação 2011/11/25 Sven Barth > Am 25.11.2011 15:21, schrieb William Oliveira Ferreira: > > Thanks for the awnser, Sven, but, my question is why not only use >> {$ifdef unix}

Re: [Lazarus] SynEdit - SelStart/SelEnd - bug

2011-11-25 Thread Martin
On 25/11/2011 14:48, silvioprog wrote: Hi, Please see in: http://bugs.freepascal.org/view.php?id=20750 Thx. See comment on the issue, Selection is correct. Though SelStart moves the caret to the start position. It may be better to have it at SelEnd. But the user code cam adjust the positio

Re: [Lazarus] Class TThread in linux;

2011-11-25 Thread Henry Vermaak
On 25/11/11 14:21, William Oliveira Ferreira wrote: Thanks for the awnser, Sven, but, my question is why not only use {$ifdef unix} cthreads {$endif} and i didn´t understand yet... Because using cthreads causes the program to be linked against libc, which people may not automatically want. H

Re: [Lazarus] Class TThread in linux;

2011-11-25 Thread Mattias Gaertner
On Fri, 25 Nov 2011 12:21:24 -0200 William Oliveira Ferreira wrote: > Thanks for the awnser, Sven, but, my question is why not only use > {$ifdef unix} > cthreads > {$endif} > and i didn´t understand yet... If you want to use threads in your program, then the above is the correct way. The cthre

Re: [Lazarus] Class TThread in linux;

2011-11-25 Thread Sven Barth
Am 25.11.2011 15:21, schrieb William Oliveira Ferreira: Thanks for the awnser, Sven, but, my question is why not only use {$ifdef unix} cthreads {$endif} and i didn´t understand yet... Using unit "cthreads" also means linking to the C library. As not every applications needs threading (and thu

Re: [Lazarus] Class TThread in linux;

2011-11-25 Thread William Oliveira Ferreira
Thanks for the awnser, Sven, but, my question is why not only use {$ifdef unix} cthreads {$endif} and i didn´t understand yet... William de Oliveira Ferreira Bacharel em Sistemas de Informação 2011/11/25 Sven Barth > Am 25.11.2011 11:17, schrieb William Olivei

[Lazarus] SynEdit - SelStart/SelEnd - bug

2011-11-25 Thread silvioprog
Hi, Please see in: http://bugs.freepascal.org/view.php?id=20750 Thx. -- Silvio Clécio === Blog - Twitter - Facebook - LazSolutions - Lazarus-BR - ===    * Conheça nosso canal IRC sobre Lazarus: #lazarus

Re: [Lazarus] Problem compiling lazarus

2011-11-25 Thread Guadagnini David
Thank you all hor the help, The problem was in the path variable of windows that in the first instance pointed to an another make <>-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/

Re: [Lazarus] Sending messages

2011-11-25 Thread zeljko
On Friday 25 of November 2011 14:33:16 Hans-Peter Diettrich wrote: > And how does PostMessage fit into the picture? I'm using PostMessage in an audio application to update position of trackbar on mainform from another thread where audio file is loaded and playing and it works ok (tested qt and

Re: [Lazarus] Sending messages

2011-11-25 Thread Hans-Peter Diettrich
Michael Schnell schrieb: On 11/25/2011 10:35 AM, Hans-Peter Diettrich wrote: Does a SendMessage call bypass any other messages which have been queued until that time? (by dispatching the message immediately to the target?) AFAIK, Yes. (i.e. in non-Windows LCLWidgetType implementations that p

Re: [Lazarus] Sending messages

2011-11-25 Thread Hans-Peter Diettrich
Felipe Monteiro de Carvalho schrieb: On Fri, Nov 25, 2011 at 10:35 AM, Hans-Peter Diettrich wrote: This doesn't answer my question. What's the *source* of the processed messages? The usual flow of events for mouse / touch / keyboard events is: Hardware -> Operating System -> Windowing Librar

Re: [Lazarus] How to check if a string is a valid floating-point number.

2011-11-25 Thread Bart
On 11/25/11, Santiago A. wrote: > El 25/11/2011 10:16, Kjow escribió: > > What about the standard pascal function "val" > Doesn't Val() use a hardcoded period (.) as decimalseparator? The StrToFloat() family uses (Default)FormatSettings AFAIK. Bart -- __

Re: [Lazarus] Class TThread in linux;

2011-11-25 Thread Sven Barth
Am 25.11.2011 11:17, schrieb William Oliveira Ferreira: Why should set $define usecthreads? only $ifdef linux doesn´t solve the issue? The default projects of Lazarus contain the following code: uses {$ifdef unix}{$ifdef usecthreads} cthreads, {$endif}{$endif} ... The "cthreads" unit

Re: [Lazarus] Problem compiling lazarus

2011-11-25 Thread Salvatore Coppola
Try this before to update with SNV delete all the file in the lazarus directory except the "fpc" and debugger directories and the lazarus executable (keep startlazarus.exe lazarus.exe and lazbuilld.exe), update with SNV and try rebuild the ide itself, so you gave a fresh Lazarus without interferenc

Re: [Lazarus] How to check if a string is a valid floating-point number.

2011-11-25 Thread silvioprog
var S: string; F: Double; R: Boolean; begin S := 'A'; R := TryStrToFloat(S, F); end; -- Silvio Clécio === Blog - Twitter - Facebook - LazSolutions - Lazarus-BR - ===    * Conheça nosso canal IRC

[Lazarus] FTP...2.4.4/bootstrap... is missing.

2011-11-25 Thread Marcos Douglas
Hi, Could please someone return the file i386-win32-ppc386.zip (or new version to compile FPC 2.5.1) to the FTP ftp://ftp.freepascal.org/pub/fpc/dist/2.4.4/bootstrap/ ? That file is used to this tutorial: http://wiki.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sou

Re: [Lazarus] How to check if a string is a valid floating-point number.

2011-11-25 Thread Santiago A.
El 25/11/2011 10:16, Kjow escribió: What about the standard pascal function "val" function IsStrFloatNum(s: string): Boolean; var dummyNumber:double; posError:integer; begin val(s, dummyNumber, posError); result:=(posError=0); end; Time ago I came across a program written by someone that ha

Re: [Lazarus] Problem compiling lazarus

2011-11-25 Thread Marcos Douglas
2011/11/25 Guadagnini David : > Dear, > > i can't compile lazarus ide or any projects. > > Preliminary operation > > 1) Download and istall Lazarus 0.9.3 (lazarus-0.9.30.2-fpc-2.4.4-win32.exe) > 2) with TortoiseSVN i have updated the files > > Now the problems: > > 1) If I start Lazarus receive thi

Re: [Lazarus] Class TThread in linux;

2011-11-25 Thread William Oliveira Ferreira
Why should set $define usecthreads? only $ifdef linux doesn´t solve the issue? William de Oliveira Ferreira Bacharel em Sistemas de Informação 2011/11/24 silvioprog > 2011/11/24 Everton Vieira : > > I'll use it tomorow, just this and will work? > > > > Thanks >

Re: [Lazarus] How to check if a string is a valid floating-point number.

2011-11-25 Thread Kjow
2011/11/25 Michael Van Canneyt : > > You should use the default TryStrToFloat() function from the sysutils unit. > It does exactly that, without exceptions. > > The function result may change if the internationalization/localization > settings have changed. e.g. if you switch from platform. > > Sec

Re: [Lazarus] Sending messages

2011-11-25 Thread Michael Schnell
On 11/25/2011 11:09 AM, Felipe Monteiro de Carvalho wrote: The usual flow of events for mouse / touch / keyboard events is: Hardware -> Operating System -> Windowing Library -> LCL Widgetset Interface-> LCL Yep. But regarding the issue discussed, the questions is "when". AFAIK, the Widge

Re: [Lazarus] Sending messages

2011-11-25 Thread Michael Schnell
On 11/25/2011 10:35 AM, Hans-Peter Diettrich wrote: Does a SendMessage call bypass any other messages which have been queued until that time? (by dispatching the message immediately to the target?) AFAIK, Yes. (i.e. in non-Windows LCLWidgetType implementations that provide their own queues, S

Re: [Lazarus] Sending messages

2011-11-25 Thread Felipe Monteiro de Carvalho
On Fri, Nov 25, 2011 at 10:35 AM, Hans-Peter Diettrich wrote: > This doesn't answer my question. What's the *source* of the processed > messages? The usual flow of events for mouse / touch / keyboard events is: Hardware -> Operating System -> Windowing Library -> LCL Widgetset Interface-> LCL E

Re: [Lazarus] Sending messages

2011-11-25 Thread Michael Schnell
On 11/25/2011 10:35 AM, Hans-Peter Diettrich wrote: So what happens on PostMessage, in detail when multiple threads post messages at the same time? With PostMessage, the events are queued one after the other and (some days later) handled in the main thread in this sequence, TWidgetSet.SendMess

Re: [Lazarus] Sending messages

2011-11-25 Thread Hans-Peter Diettrich
Felipe Monteiro de Carvalho schrieb: On Thu, Nov 24, 2011 at 6:18 PM, Hans-Peter Diettrich wrote: Q: does the LCL support more than one message queue (the one in Application)? There are various event loops: * Application.Run * ShowModal makes a loop too * ProcessMessages has a short lived lo

[Lazarus] Problem compiling lazarus

2011-11-25 Thread Guadagnini David
Dear, i can't compile lazarus ide or any projects. Preliminary operation 1) Download and istall Lazarus 0.9.3 (lazarus-0.9.30.2-fpc-2.4.4-win32.exe) 2) with TortoiseSVN i have updated the files Now the problems: 1) If I start Lazarus receive this errors: Package: "FCL 1.0.1" Unit: "XMLCfg" U

Re: [Lazarus] How to check if a string is a valid floating-point number.

2011-11-25 Thread Michael Van Canneyt
You should use the default TryStrToFloat() function from the sysutils unit. It does exactly that, without exceptions. The function result may change if the internationalization/localization settings have changed. e.g. if you switch from platform. Secondly, please note that in the debugger y

Re: [Lazarus] How to check if a string is a valid floating-point number.

2011-11-25 Thread Michael Fuchs
Am 25.11.2011 10:16, schrieb Kjow: Debugger Exception Notification project.exe raised exception class 'EConvertError' with message: "Cross" is an invalid float This happens only if you run it in Lazarus. In this notification window should be a checkbox for ignoring this exception type while de

Re: [Lazarus] Sending messages

2011-11-25 Thread Felipe Monteiro de Carvalho
On Fri, Nov 25, 2011 at 10:14 AM, Michael Schnell wrote: > The question is what is meant by "send" here. AFAIK, (other than Windows > that does a "Messages" mechanism) here, we have callbacks. And Callbacks > result from the main thread of the application calling a function. "here" means what? If

[Lazarus] How to check if a string is a valid floating-point number.

2011-11-25 Thread Kjow
Hi all, I need to know if a string is a valid floating-point number, so I tried this function: function IsStrFloatNum(s: string): Boolean; begin try // try to convert the string into a floatnumber StrToFloat(s); // if there is no error the result is true Result := True; except

Re: [Lazarus] Sending messages

2011-11-25 Thread Michael Schnell
On 11/25/2011 09:45 AM, Felipe Monteiro de Carvalho wrote: X11 does not send direct events. Direct events are sent by Cocoa and also by Android. I don't know if you can stick non-X11 events into that queue, but this hability by itself is not what defines something as a queue or not. The ques

[Lazarus] SetScrollInfo

2011-11-25 Thread Hans-Peter Diettrich
TWin32WidgetSet.SetScrollInfo modifies the content of the ScrollInfo ScrollInfo.nMax := Max(ScrollInfo.nMin, ScrollInfo.nMax - 1); i.e. nMax is typically decremented by 1, with *every* new call! IMO this is *not* a desireable behaviour. Iff there exists a difference between the LCL and Win32

Re: [Lazarus] Sending messages

2011-11-25 Thread Felipe Monteiro de Carvalho
Indeed, there is an error in my last message. There is at least 1 queue in the LCL: TApplication.FAsyncCall: TAsyncCallQueues; And it is pooled by the main application loop. I took a quick look and I didn't find any other queues in TApplication. > But IMHO (other than Windows) X11 and friends d

Re: [Lazarus] Sending messages

2011-11-25 Thread Michael Schnell
On 11/24/2011 08:56 PM, Felipe Monteiro de Carvalho wrote: And user code can also start their own loops by using ProcessMessages I wouldn't call those loops "event queues", because they don't implement any kind of queues, they process all events which are obtained immediately. The events are no

Re: [Lazarus] Sending messages

2011-11-25 Thread Michael Schnell
On 11/24/2011 06:18 PM, Hans-Peter Diettrich wrote: Q: does the LCL support more than one message queue (the one in Application)? AFAIK, the implementation in most non-Windows LCLWidgetTypes is that multiple queues are created but the target of all of them is the main thread that provides a "