• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Astoundingly dumb bindings question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Hide NSMenuItem
  • Next by Date: Re: NSShadow not working as expected
  • Previous by thread: refresh of tableColumn headerView not working
  • Next by thread: Creating drag images from NSView snapshots
  • Index(es):
    • Date
    • Thread