Re: Initialising NSTableColumn ??? Continued from : Setting NSPopUpButtonCell Value from NSTable
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.