Re: Newbie: help with NSTableView and NSPopUpButtonCell
Re: Newbie: help with NSTableView and NSPopUpButtonCell
- Subject: Re: Newbie: help with NSTableView and NSPopUpButtonCell
- From: Martin Linklater <email@hidden>
- Date: Fri, 19 Aug 2005 11:02:01 +0100
I've got it working. I'll explain what I did just in case anyone else is interested.
First, I created a mutable array (called 'statusValues') and added three NSString objects to it.
Then in the NSArrayControllers 'contentArray' binding structure I added an NSString entry (called 'status'), along with it's 'status' and 'setStatus' methods.
Then, in IB, select the NSTableColumn of the column containing the NSPopUpButtonCell's and change two of it's bindings:
'contentValues' is set to the 'statusValues' mutable array.
'selectedValue' is set to the 'status' field of the NSArrayControllers arrangedObjects.
All that was left was to initialise the NSString in the init method of the array entry object.
Seems to work fine. I don't think I've done anything horrendous... 8)
---
http://homepage.mac.com/mslinklater
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden