Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
- Subject: Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
- From: Quincey Morris <email@hidden>
- Date: Wed, 23 Nov 2011 13:39:35 -0800
On Nov 23, 2011, at 12:40 , Gilles Celli wrote:
> things are a little more clear now, so I will stick with the NSArray version.
Actually, I gave you a partially wrong answer. I noticed you are using a NSOutlineView, but then I forgot to take into account the list hierarchy. In general, trying to back a hierarchical list with a flat array isn't going to work too well. The only time it really works is if the list never changes, in which case the correlation between row number and item is fixed.
For the general case, you're going to need either a hierarchical data model, or the ability in your data source methods to construct the hierarchy on the fly. Either is feasible. NSTreeNode is a useful class if you're creating a hierarchical data model.
_______________________________________________
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