NSWindowController, NSWindow, and NSThread
NSWindowController, NSWindow, and NSThread
- Subject: NSWindowController, NSWindow, and NSThread
- From: Michael Horn <email@hidden>
- Date: Sat, 02 Feb 2002 20:57:25 -0800
According to this webpage
(
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/Multithreading/index.html)
I can create Windows in a secondary thread. However, when I make a
subclass of NSWindowController and then detach a thread which
subsequently creates an instance of this subclassed
NSWindowController, the window has no drop shadow. To help
illustrate, here is some pseudo-code.
- (void) awakeFromNib {
[NSThread detachNewThreadSelector:@selector(testThread)
toTarget:self withObject: nil];
};
-(void) testThread {
NSWindowControllerSubClass *test;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
test = [[NSWindowControllerSubClass alloc] initWithWindowNibName: @"Test"];
[test showWindow: nil];
[pool release];
};
I have seen a lot of other funny behavior as well, but this is the
most obvious.
Can someone point me down the right path? Thanks.
References: | |
| >Re: XML-RPC (From: Joseph Heck <email@hidden>) |