Thanks guys - I have been using this approach in my Linux libs for awhile now, and appears to work ok.

Just having intermittant gtk errors within my library and trying to determine if the Lib -> Gui area may be my problem (no extra threads in use)

So probably need to look elsewhere at what I'm doing wrong



On 05/06/12 15:59, Mattias Gaertner wrote:
On Tue, 05 Jun 2012 10:18:04 +0930
SteveG<[email protected]>  wrote:

I understand that the gui system is non-reentrant, and therefore should
not be accessed by any thread but the main one.
yes

I am using cmem as my memory manager for both my app and library (if
thats relevant),
yes it is relevant.
If you have two memory managers you can not exchange strings and
classes.


and it would appear that the entrant thread of the
library is the same as the main app ?
Yes.

What OS?


So.... is it safe to read / write to gui components (I have the control
addresses) from within the library (no new threads created) without
problems ?
The "is" operator requires that the library uses the VMTs of the main
application.


To summarise - can I rd/wr to form controls from within a cmem
controlled library using its main thread ?
Yes, to some degree.

Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to