• 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
Re: NSPopUpButtonCells in TableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpButtonCells in TableView


  • Subject: Re: NSPopUpButtonCells in TableView
  • From: Brian Webster <email@hidden>
  • Date: Tue, 17 Sep 2002 20:12:35 -0500

On Tuesday, September 17, 2002, at 07:47 PM, email@hidden wrote:

This is the first time I've tried using a custom cell in a tableview. It
looks fine, and the pop up menus look and act as expected, but they do not
get or set their values from my datasource. I can't figure out that part.
I was able to set the initial values in the pop-ups from an archived file,
but the view acted funny and didn't redraw itself properly.

I've wandered in the wilderness of the docs for a couple of days. Can
someone point me to an example?

The trick with using pop-up cells in a table view is that the object value you return from the data source is an NSNumber containing the index of the item from the menu that you want to be displayed. Similarly, when the user selects an item from one of the menus, the object value that gets passed to the data source will be an NSNumber containing the index of the selected item.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Non user-selectable NSMixedState
  • Next by Date: Inserting a view into an NSSplitView
  • Previous by thread: NSPopUpButtonCells in TableView
  • Next by thread: Re: NSPopUpButtonCells in TableView
  • Index(es):
    • Date
    • Thread