2009/2/19 Richard Frith-Macdonald
<richard@tiptree.demon.co.uk>
On 19 Feb 2009, at 00:28, Julien Isorce wrote:
I tried you suggestion and it seems to be fine. I have not tested the full things I need but the minimum is working.
Thx for that.
I have 2 questions:
--First, why I have to use preformInMainThread ? The 'C' thread is registered so ...
Maybe because " [NSApplication sharedApplication] " has to be called in the second thread.
I tried to call it in the 'C' thread without any success.
Yes ... if you want to call gnustep GUI methods, you need to do that in the main thread.
And all what I need is working now doing what you suggested. OpenGL too in that way and on win32.
So thx a lot.
--Second, "GSRegisterCurrentThread()" is a function specific to GNUstep.
And this function is not available using Apple developper environment. So I will not be able to compile my code in there.
Any comment?
I don't know how you would achieve your aim on MacOS. Possibly you can just run the application run loop in a secondary thread there ... I don't know if that works.
I will try just same code but without calling GSRegisterCurrentThread(). I let you know if that works.