Re: NSObjectController mapped to NSArrayController selection
Re: NSObjectController mapped to NSArrayController selection
- Subject: Re: NSObjectController mapped to NSArrayController selection
- From: Quincey Morris <email@hidden>
- Date: Wed, 23 Dec 2009 03:30:48 -0800
On Dec 23, 2009, at 00:10, Tom wrote:
> I have the following situation: NSArrayController which handles array of
> Core Data objects. Then I want to map it's selection (there can only be one
> selected at a time) to NSObjectController's contents and then use the object
> controller for binding to the view. I want to use the object controller as
> the entry point for the second nib, but I can't get it to work even in the
> same nib. This is how I figure:
>
> NSObjectController bindings (in IB):
> - Content Object > (my NSArrayController) with controller key "selection"
>
> A label:
> - Value > (the NSObjectController) with controller key "content" and model
> key "name"
>
> However the label shows nothing no matter what selection is there.
> NSArrayController's selection is properly updated - if I bind the label to
> it's selection.name directly it works. What am I missing?
Did you try binding the label to controller key "selection" in the object controller, instead of "content"? It ought to be the same thing, functionally, but "selection" is a proxy object so the actual behavior might be slightly different.
Did you also check your console log for error messages? It's worth doing so when bindings mysteriously fail to do anything.
_______________________________________________
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