Re: NSButtonCell binds only readonly; Non-bool bindings OK.
Re: NSButtonCell binds only readonly; Non-bool bindings OK.
- Subject: Re: NSButtonCell binds only readonly; Non-bool bindings OK.
- From: Kyle Sluder <email@hidden>
- Date: Thu, 23 Apr 2009 14:27:17 -0400
On Thu, Apr 23, 2009 at 2:08 PM, Jerry Krinock <email@hidden> wrote:
> In a table view, I have a couple of "user-defined" columns which the user
> can click on the header of to pop up a menu of 15 attributes, choosing one
> for the column to display/edit. Most of the attribute types are strings,
> several are boolean and one is an array. In my table column's subclass,
> -dataCellForRow: returns a text field cell, button cell (checkbox) or token
> field cell, depending on this attribute type.
IIRC NSTokenFieldCell is not supported inside of NSTableView. I'm
pretty sure I had that problem not too long ago.
> (In order to handle the user-defined key, I have bound these table columns
> to a key such as 'userDefined0', and then implemented in my "record" class,
> for example, -userDefined0 and -setUserDefined0:. These in turn dig up the
> current user-defined key for the column and pass the message thru to the
> appropriate "regular" accessor.)
If I'm understanding your architecture correctly, you may be subtly
violating KVO. Have you instead tried just dynamically unbinding and
rebinding the columns in response to your user input?
--Kyle Sluder
_______________________________________________
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