Re: NSWindow in threads

2009-05-26 Thread Michael Ash
On Tue, May 26, 2009 at 10:51 AM, Joar Wingfors wrote: > Your comment is correct in general, but according to the thread safety > guidelines you're supposed to be able to create windows on background > threads: > >

Re: NSWindow in threads

2009-05-26 Thread Mike Abdullah
On 26 May 2009, at 15:51, Joar Wingfors wrote: On 26 maj 2009, at 07.27, Mike Abdullah wrote: You've missed the big warning somewhere in the docs that most of AppKit is not threadsafe. Why do you want to create a window on another thread? What is wrong with doing it on the main thread?

Re: NSWindow in threads

2009-05-26 Thread Joar Wingfors
On 26 maj 2009, at 07.27, Mike Abdullah wrote: You've missed the big warning somewhere in the docs that most of AppKit is not threadsafe. Why do you want to create a window on another thread? What is wrong with doing it on the main thread? Mike, Your comment is correct in general, but ac

Re: NSWindow in threads

2009-05-26 Thread Joar Wingfors
On 26 maj 2009, at 08.03, Mike Abdullah wrote: Wow, I had no idea of this particular aspect of the rules. My suspicion is this exists to accomodate Cocoa's ability to use window objects for caching a view's contents to an image. Maybe the act of showing a window is what is breaking on a se

Re: NSWindow in threads

2009-05-26 Thread Mike Abdullah
You've missed the big warning somewhere in the docs that most of AppKit is not threadsafe. Why do you want to create a window on another thread? What is wrong with doing it on the main thread? On 26 May 2009, at 10:51, Mattias Jansson wrote: I'm trying to create a window from code in a thr

NSWindow in threads

2009-05-26 Thread Mattias Jansson
I'm trying to create a window from code in a thread created with NSThread detachNewThreadSelector:toTarget:withObject The main thread simply calls NSApplicationMain The window is created with [[NSWindow alloc] initWithContentRect:rect styleMask:(NSTitledWindowMask|NSClosableWindowMask|NSMini