Re: Binding to a controller in a different nib
Re: Binding to a controller in a different nib
- Subject: Re: Binding to a controller in a different nib
- From: "Kyle Sluder" <email@hidden>
- Date: Thu, 28 Feb 2008 14:41:12 -0500
On Thu, Feb 28, 2008 at 12:47 PM, Randall Meadows <email@hidden> wrote:
> Please help me extend my understanding of bindings...I grasp the
> simple stuff, but not yet to an extent to be able to apply that to
> complex situations.
>
> In my main window (which resides in it's own nib, and is controlled by
> a custom window controller), I have a combobox. I'd like to populate
> the contents of that via bindings.
>
> In my main nib file is where the controller lives that maintains the
> information that I want to populate that combobox with. This
> controller has a dictionary ("infoDictionary"), and the keys of that
> dictionary are what I want displayed in the combobox.
Wire up the controller to an infoController outlet in your application
delegate, then bind the combo box to
NSApplication.delegate.infoController with whatever keypath you'd
like.
--Kyle Sluder
_______________________________________________
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