Re: NSWindowController confusion redux
Re: NSWindowController confusion redux
- Subject: Re: NSWindowController confusion redux
- From: Sherm Pendley <email@hidden>
- Date: Tue, 23 May 2006 11:32:36 -0400
On May 23, 2006, at 12:11 AM, Ken Tozier wrote:
I guess I don't understand how a window can exist on screen and
behave normally at least as far as layer switching/moving around
the screen goes if nothing owns or has access to it.
Calling -initWithWindowNibName: doesn't mean the Nib has no owner, it
just defaults to assigning the window controller as the owner. You
only need -initWithWindowNibName:owner: if you want something other
than that to be the owner.
What could possibly be the owner if not the window controller?
Anything. The only requirement for an "owner" is that it defines the
outlets and actions you've set up in IB. It can be a plain NSObject
subclass if you want.
Think of it as a refactoring option; if your customized window
controller class is getting too big, you can split off the outlets &
actions into a separate class.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden