'Static' items in an NSOutlineView
'Static' items in an NSOutlineView
- Subject: 'Static' items in an NSOutlineView
- From: Koen van der Drift <email@hidden>
- Date: Fri, 14 Oct 2011 12:24:36 -0400
Hi,
I’m trying to find out how to create the grayish, static items in an
NSOutlineView, eg “Library” in iTunes or “Mailboxes” in Mail.
Sometimes they have a disclosure triangle, eg "Devices" in the Finder.
I think I need to subclass NSCell to change the font, etc. But I am
not sure how to identify these, would an attribute “isStaticItem” for
my Group Entity or something like that be a good approach?
Secondly, are they part of the NSOutlineView, and the underlying
NSTreeController and CoreData model? Just like in the abovementioned
examples, these items are already present when the app is started up
the first time, so if they are part of the core data model, they must
be created programmatically at first, and become part of the model
once the user starts adding folders and items. So if the app doesn’t
find a database, it will create the starting list. Again, is this the
correct approach?
Any pointers appreciated,
Thanks,
- Koen.
_______________________________________________
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