Astoundingly dumb bindings question
Astoundingly dumb bindings question
- Subject: Astoundingly dumb bindings question
- From: "Andrew R. Kinnie" <email@hidden>
- Date: Sat, 30 Jun 2007 19:58:09 -0400
OK, I have looked at the docs, the archives, google, etc. I seem to
be having no luck doing something that should be crazy easy. I want
to have an NSPopUpButton, which is bound to an array of NSNumbers. I
have an action, which wants to grab the number from the selection of
the popup, and do something with it, displaying the results of the
calculation in a textfield.
I could do this programmatically, but I was thinking some of this
might be easier and quicker with bindings. So I created an array
controller to control the array I created in code, and used it to
populate the popup. No problem. I bound the content to the array
controller's arranged objects. Thing is, I can't seem to find an
appropriate binding or method to grab the object represented by the
popup's selection. I tried to bind the contentValues,
contentObjects, and lastly I tried selectedIndex bound to the array
controller's selectionIndex.
The best I get is a proxy object that is not the NSNumber, and can't
respond to intValue appropriately.
What should I be doing here? Thanks in advance.
_______________________________________________
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