Re: NSPopUpButtonCells in TableView
Re: NSPopUpButtonCells in TableView
- Subject: Re: NSPopUpButtonCells in TableView
- From: Jonathan Jackel <email@hidden>
- Date: Wed, 18 Sep 2002 12:19:01 -0400
It works! Thank you.
Now I would like to be able to tab into the cell and use the keyboard to
select items from the pop up. I've tried refusesFirstResponder:NO on the
cell and programmatically (as well as in IB) setting the column to
"editable" with no luck.
Jonathan
on 9/17/02 9:12 PM, Brian Webster at email@hidden wrote:
>
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.
_______________________________________________
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.