• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTreeController filter contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTreeController filter contents
      • From: "Michael Hanna" <email@hidden>
References: 
 >NSTreeController filter contents (From: "Michael Hanna" <email@hidden>)

  • Prev by Date: Re: CoreData pagination
  • Next by Date: Re: CoreData pagination
  • Previous by thread: NSTreeController filter contents
  • Next by thread: Re: NSTreeController filter contents
  • Index(es):
    • Date
    • Thread