Re: NSTableview Datasource and NSPopupbuttonCell
Re: NSTableview Datasource and NSPopupbuttonCell
- Subject: Re: NSTableview Datasource and NSPopupbuttonCell
- From: Matt Neuburg <email@hidden>
- Date: Mon, 28 Jul 2008 09:18:12 -0700
- Thread-topic: NSTableview Datasource and NSPopupbuttonCell
On Thu, 24 Jul 2008 21:50:31 +1000, Steven Hamilton <email@hidden> said:
>Hi Folks,
>
>I have a NSTableview with a datasource consisting of an NSArray of
>dictionaries. One column in my table has an NSPopupbuttonCell. The
>content and contentValues are bound to a Core Data "Account" object. I
>use a "name" property as my contentValue.
>
>I'm having trouble changing the popup button. I know in my datasource
>I get an index of the selected object and in my setObjectValue
>datasource method I set the key in the dictionary with this new
>NSNumber inValue. However, in operation when I change the popupbutton
>it very quickly changes back to the first object in the list (index 0).
>
>Clearly I'm missing something or have set something wrongly in IB.
How comes it that you are using both bindings and the
tableView:setObjectValue:... datasource method? It should be one or the
other; either use bindings or use the NSTableDataSource protocol. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden