Re: [fpc-pascal] PostMessage() from a thread (in a thread save manner)

2008-10-20 Thread Graeme Geldenhuys
Thanks to everybody that replied... On Mon, Oct 20, 2008 at 6:43 PM, Lukas Gradl <[EMAIL PROTECTED]> wrote: > I prefer to implement the messaging in the object it belongs to - in this > case on fpgApplication. The Queue will not be visible from outside, only > funcions like PostMessage, GetMessag

Re: [fpc-pascal] PostMessage() from a thread (in a thread save manner)

2008-10-20 Thread dmitry boyarintsev
Your code is safe for multiple threads to post to the queue. But you also must make sure, that Processing a messsage from queue, would not break Posting safetiness. The easiest way, is to wrap message extraction into the same fpgApplication.Lock You must also make sure, that no thread can try to

Re: [fpc-pascal] PostMessage() from a thread (in a thread save manner)

2008-10-20 Thread Lukas Gradl
Graeme Geldenhuys schrieb: Some developers prefer to pass in a GUI component to a thread instance, so the thread knows what widget to update. Other users prefer to post a "gui update" message to the application event queue. I'm very new to threads and might know just enough to make in dangerous.

Re: [fpc-pascal] PostMessage() from a thread (in a thread save manner)

2008-10-20 Thread Vinzent Höfler
Graeme Geldenhuys wrote: Some developers prefer to pass in a GUI component to a thread instance, so the thread knows what widget to update. Other users prefer to post a "gui update" message to the application event queue. I'm very new to threads and might know just enough to make in dangerous. :

Re: [fpc-pascal] threading on posix platform

2008-10-20 Thread Vinzent Höfler
Bee wrote: It might be the case, I'm not sure. In my case, sometimes my app (fcgi) couldn't create a new requested thread, but at other times it created successfully. It happened randomly which gave me enough headaches to find what caused the problem. Such case didn't happen on windows. http:/

Re: [fpc-pascal] threading on posix platform

2008-10-20 Thread Bee
In the end (with a few posts to the mailing list), we found out that if a task (thread) is quick or not very CPU intensive, Linux prefers to give them longer timeslices instead of constantly switching threads. That was the only thing I noticed, but other than that, I use threads (although little a

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Michael Van Canneyt
On Mon, 20 Oct 2008, Marco van de Voort wrote: > In our previous episode, Michael Van Canneyt said: > > > Same as a browser, but maybe worse: > > > How do you instrument a PDF reader platform independantly? And (specially > > > with recent Adobe readers): speed. > > > > That's an implementation

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > How is the speed? Does it match say a D7 help ? > > Not even D2005, D2007 or D2009 matches the D7 help speed! :-) Yes, but IMHO that is pretty much more related to politics, not technical. Indexes of RTL and FCL CHMs are read in the blink of

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Graeme Geldenhuys
On Mon, Oct 20, 2008 at 12:09 PM, Marco van de Voort <[EMAIL PROTECTED]> wrote: > > How is the speed? Does it match say a D7 help ? Not even D2005, D2007 or D2009 matches the D7 help speed! :-) Regards, - Graeme - ___ fpGUI - a cross-platform Free

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > Same as a browser, but maybe worse: > > How do you instrument a PDF reader platform independantly? And (specially > > with recent Adobe readers): speed. > > That's an implementation detail, but doesn't make PDFs a priori unsuitable > as help f

[fpc-pascal] PostMessage() from a thread (in a thread save manner)

2008-10-20 Thread Graeme Geldenhuys
Some developers prefer to pass in a GUI component to a thread instance, so the thread knows what widget to update. Other users prefer to post a "gui update" message to the application event queue. I'm very new to threads and might know just enough to make in dangerous. :-) In fpGUI the applicatio

Re: [fpc-pascal] fpSelect() with very small timeout?

2008-10-20 Thread Martin Schreiber
On Monday 20 October 2008 10.36:48 Graeme Geldenhuys wrote: > On Mon, Oct 20, 2008 at 10:19 AM, Martin Schreiber <[EMAIL PROTECTED]> wrote: > > [...] > > You could send a wakeup message to the X event queue if a widget has been > > invalidated instead of polling. See MSEgui lib/common/msegui.pas >

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Michael Van Canneyt
On Mon, 20 Oct 2008, Marco van de Voort wrote: > In our previous episode, Michael Van Canneyt said: > > > In our previous episode, Francisco Reyes said: > > > > Based on your schedule when do you think you may get the opendocument > > > > format or the Excel 5 working under Linux/FreeBSD? > > >

Re: [fpc-pascal] using static linking of dylib in mac 10.5

2008-10-20 Thread Jonas Maebe
On 19 Oct 2008, at 20:54, Guru Kathiresan wrote: I'm not able to do a static link of a dylib (with the latest lazarus + fpc build). I'm using the following code: function MyDyLibFunction: int; cdecl; external 'mylib.dylib'; begin MyDyLibFunction; end; If I use the LoadLibrary function to

[fpc-pascal] using static linking of dylib in mac 10.5

2008-10-20 Thread Guru Kathiresan
Hello, I'm not able to do a static link of a dylib (with the latest lazarus + fpc build). I'm using the following code: function MyDyLibFunction: int; cdecl; external 'mylib.dylib'; begin MyDyLibFunction; end; If I use the LoadLibrary function to load the 'mylib.dylib' I'm get

Re: [fpc-pascal] fpSelect() with very small timeout?

2008-10-20 Thread Graeme Geldenhuys
On Mon, Oct 20, 2008 at 10:19 AM, Martin Schreiber <[EMAIL PROTECTED]> wrote: > [...] > You could send a wakeup message to the X event queue if a widget has been > invalidated instead of polling. See MSEgui lib/common/msegui.pas > tguiapplication.invalidated and the postevent infrastructure for an

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > In our previous episode, Francisco Reyes said: > > > Based on your schedule when do you think you may get the opendocument > > > format or the Excel 5 working under Linux/FreeBSD? > > > > > > Also, any plans to have the help in anything other

Re: [fpc-pascal] fpSelect() with very small timeout?

2008-10-20 Thread Martin Schreiber
On Monday 20 October 2008 09.57:35 Graeme Geldenhuys wrote: > Hi, > > Below is some code I use in fpGUI-X11's main event loop. When I played > around with multithreading, I wrote a simple application, created 4 > threads that each update there own ProgressBar. I noticed that if I > don't move the

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Michael Van Canneyt
On Mon, 20 Oct 2008, Marco van de Voort wrote: > In our previous episode, Francisco Reyes said: > > Based on your schedule when do you think you may get the opendocument > > format or the Excel 5 working under Linux/FreeBSD? > > > > Also, any plans to have the help in anything other than chm?

[fpc-pascal] fpSelect() with very small timeout?

2008-10-20 Thread Graeme Geldenhuys
Hi, Below is some code I use in fpGUI-X11's main event loop. When I played around with multithreading, I wrote a simple application, created 4 threads that each update there own ProgressBar. I noticed that if I don't move the mouse, the ProgressBar gets updated slowly. And when I move the mouse o

Re: [fpc-pascal] Spreadsheet library/unit?

2008-10-20 Thread Marco van de Voort
In our previous episode, Francisco Reyes said: > Based on your schedule when do you think you may get the opendocument > format or the Excel 5 working under Linux/FreeBSD? > > Also, any plans to have the help in anything other than chm? > I found some viewers/converters, so I think I will be able