• 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: Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable


  • Subject: Re: Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 4 Jul 2004 13:42:32 -0700

It looks like you want the same menu for every pop-up button cell in your table column. If that's the case, then you don't need to override NSTableColumn or anything like that. All you need to do is configure a single NSPopUpButtonCell and set it as your NSTableColumn's dataCell. Then, in your data source, for the value of a row in that NSTableColumn just return an NSNumber containing the index of the selected item.

On Jaguar and earlier, you'll have to configure and assign the NSPopUpButtonCell in an -awakeFromNib method, probably in whatever you're using as a delegate or dataSource for your NSTableView. (You can make this easier by configuring a menu in Interface Builder, and just telling the NSPopUpButtonCell to use it.) In Panther, you can attach an NSPopUpButtonCell to your NSTableColumn directly in Interface Builder and configure it entirely from the Info window.

-- Chris

--
Chris Hanson <email@hidden>
http://www.livejournal.com/users/chanson/
_______________________________________________
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.


  • Follow-Ups:
    • Re: Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable
      • From: "Alexander F. Hartner" <email@hidden>
References: 
 >Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable (From: "Alexander F. Hartner" <email@hidden>)

  • Prev by Date: detecting hard drives
  • Next by Date: Re: Generating simple on-the-fly TIFF files
  • Previous by thread: Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable
  • Next by thread: Re: Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable
  • Index(es):
    • Date
    • Thread