Re: binding to a controller not in my nib, how?
Re: binding to a controller not in my nib, how?
- Subject: Re: binding to a controller not in my nib, how?
- From: "Sean McBride" <email@hidden>
- Date: Sat, 3 Dec 2005 20:45:16 -0500
marquis logan (email@hidden) on 2005-12-02 21:05 said:
>
you could use a key path through "file's owner" and have multiple
>
array controllers bound to the same content array; it would be
>
beneficial to use kvc compliant accessors to manipulate this array.
Well, I've made it work that way. One NSArray and a different
NSArrayController in each NIB.
But I'm hoping to take it even further and have just one
NSArrayController. It almost works, but not quite.
In MainMenu.nib I have an NSArrayController and MyAppController which is
my app's delegate and has an outlet to the NSArrayController. In
MyWindow.nib I have a window with widgets that I want to bind to that
NSArrayController. Say I take a textfield, I've bound it like so:
Bind to: Shared Application
Controller Key: -
Model Key Path: delegate.myArrayController.selection.fullName
or even
Model Key Path: delegate.myArrayController.arrangedObjects.@count
Both work, great!
But if I bind an NSTableColumn like so:
Model Key Path: delegate.myArrayController.arrangedObjects.fullName
The table is empty, shouldn't that work??
Thanks!!
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer Montréal, Québec, Canada
_______________________________________________
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