• 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
Re: NSWindowController confusion redux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSWindowController confusion (From: Ken Tozier <email@hidden>)
 >Re: NSWindowController confusion (From: Sherm Pendley <email@hidden>)
 >Re: NSWindowController confusion (From: Ken Tozier <email@hidden>)
 >Re: NSWindowController confusion redux (From: Ken Tozier <email@hidden>)
 >Re: NSWindowController confusion redux (From: mmalcolm crawford <email@hidden>)
 >Re: NSWindowController confusion redux (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: NSTableView Cocoa Bindings: Handling enter/return on non-editable list
  • Next by Date: Re: NSWindowController confusion redux
  • Previous by thread: Fwd: NSWindowController confusion redux
  • Next by thread: Menu bar
  • Index(es):
    • Date
    • Thread