• 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: Binding Across Nibs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding Across Nibs


  • Subject: Re: Binding Across Nibs
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 6 Jul 2007 00:20:40 -0400

mmalc's solution assumes that you're using the application document support in Cocoa (which is the most common situation)

The solution is essentially the same if you're not, but your application is responsible for either providing some way to access the data via a keypath from an object the nib can access (for example application, the application's delegate, or the File's Owner), or binding the content to the data model programmatically when the nib loads.


On Jul 5, 2007, at 5:12 PM, mmalc crawford wrote:

On Jul 5, 2007, at 2:05 PM, Mike McNamara wrote:

That NSTableView, the parent window and NSArrayController reside in an NSWindowController subclass in another Nib. How do I set a content outlet across Nib files?

Just as you would any other binding, by following suitable key paths.
The window controller knows what it's document is, so you can bind to [File's Owner].document.whatever...
Or instantiate an NSObjectController and set its content to [File's Owner].document and bind to that.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Binding Across Nibs (From: Mike McNamara <email@hidden>)
 >Re: Binding Across Nibs (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: NSCell bezel drawing
  • Next by Date: Accesing a file from a remote machine
  • Previous by thread: Re: Binding Across Nibs
  • Next by thread: NSSavePanel and allowing unknown extensions
  • Index(es):
    • Date
    • Thread