binding MutableArray to NSPopUpButton

Discussion in 'Mac Programming' started by liptonlover, Aug 31, 2008.

  1. liptonlover
    Expand Collapse
    macrumors 6502a

    Joined:
    Mar 13, 2008
    #1
    Popup buttons seem to be a bit different from a tableview... but it's what I need for my application. I can't figure out how to get a list of custom objects to show up, to edit how many are in the list, and how to act when one is selected. Can anyone help?
     
  2. stadidas
    Expand Collapse
    macrumors regular

    Joined:
    Feb 27, 2006
    Location:
    Kent, United Kingdom
    #2
    You need to bind the content of the popup button to the array controller's arranged objects, bind the content values to the array controller's arranged objects, and set the key path to which ever variable you want to display, and bind the popup button's selected index to the array controller with the controller key set to selectionIndex.
     

Share This Page