ButtonCell with Text in OutlineView
ButtonCell with Text in OutlineView
- Subject: ButtonCell with Text in OutlineView
- From: David <email@hidden>
- Date: Thu, 15 May 2008 13:39:18 -0400
I'm trying to have a hierarchical set of choices with a checkbox next to
each one. How can I best set this up?
My current thinking was to try and create a NSButtonCell subclass which
would act like a NSTextCell in that setting its value would set its title,
but I'd parse the string which is encoded with a flag to indicate if the
button is selected or not.
I have NSTreeController bound to my model and the column in NSOutlineView
bound to the appropriate key path in NSTreeController.
I do not understand how the column in the NSOutlineView knows how to set the
property to the cell. How are the cell and column related? How do they
interact?
What method do I need to implement in my cell to intercept the value being
set so that I can in turn set the title and button state?
Is this the best approach? Is there some other preferred approach to this
common problem?
Thanks
_______________________________________________
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