Re: Binding Across Nibs
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