• 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: advice on filtering TreeNode objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: advice on filtering TreeNode objects


  • Subject: Re: advice on filtering TreeNode objects
  • From: Andreas Mayer <email@hidden>
  • Date: Sun, 3 Nov 2002 13:33:33 +0100

Am Sonntag, 03.11.02 um 09:42 Uhr schrieb Alex Rice:

I need to apply a filter to the root treenode and have it filter all the children on some condition, like hiding todo items that are completed, for example. I'm sure I can code it for that particular case, but I would rather implement a general-purpose filtering scheme, so I can expand it to keyword searching or other filters later on. I just can't conceptualize how to do it. Seems like there must be a design pattern here. Any suggestions?

IMHO filtering is not a feature of a tree data structure but one of your particular data stored inside that tree. So I wouldn't build it into the TreeNode class but in the data source of your outline view.

If filtering is a common task in your app a filter protocol seems the way to go.


bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: advice on filtering TreeNode objects
      • From: Alex Rice <email@hidden>
References: 
 >advice on filtering TreeNode objects (From: Alex Rice <email@hidden>)

  • Prev by Date: Multiple selected tabviewitems at once?!?!
  • Next by Date: Re: Plug-In strategy in Mach-O / Cocoa?
  • Previous by thread: advice on filtering TreeNode objects
  • Next by thread: Re: advice on filtering TreeNode objects
  • Index(es):
    • Date
    • Thread