Re: Binding a popup button's selected index to a model integer
Re: Binding a popup button's selected index to a model integer
- Subject: Re: Binding a popup button's selected index to a model integer
- From: "I. Savant" <email@hidden>
- Date: Tue, 29 Apr 2008 12:25:52 -0400
> I would appreciate some guidance in getting a popup button to use its
> selectedIndex to set an integer in my model.
Am I correct in assuming you want your popup to represent the
-gameType of the selected item in the array controller?
If so, the best thing to do is to create an NSObjectController
instance and bind its content object to the array controller's
selected object (via the array controller's 'selection' key). Bind
your popup's -selectionIndex to your object controller's -gameType key
(which reprsents the gameType of the selection of the array of (I
assume) games or whatever.
Using this mechanism, the object controller always represents the
selected object of your array controller which makes things a hell of
a lot easier to manage. :-)
--
I.S.
_______________________________________________
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