• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSWindowController, NSWindow, and NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: XML-RPC
  • Next by Date: Re: XML-RPC
  • Previous by thread: Re: XML-RPC
  • Next by thread: Re: XML-RPC
  • Index(es):
    • Date
    • Thread