Re: NSTreeController filter contents
Re: NSTreeController filter contents
- Subject: Re: NSTreeController filter contents
- From: Jens Alfke <email@hidden>
- Date: Mon, 23 Jun 2008 18:09:56 -0700
On 23 Jun '08, at 5:10 PM, Michael Hanna wrote:
How do I filter-out the contents of an NSTreeController? I saw an
example with NSArrayController by overriding the [NSArrayController
-arrangeObjects] method, but NSTreeController doesn't have this
method.
I asked about this a month or two ago, and the consensus seemed to be
that there isn't any built-in way to filter the contents of the tree.
I've ended up doing the filtering myself. If we call my regular tree
model class Item, then I've created a class FilteredItem. This acts as
a proxy for an Item, but its -children method filters out the children
I don't want to display, and returns FilteredItem proxies for those I
do.
—Jens_______________________________________________
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