Edit AllPages

How would I use a search field to filter a NSOutlineView/NSTreeController? I know it would have something to do with bindings and a predicate. But not specifically how to. Could someone tell me how I could filter an NSOutlineView/NSTreeController? I saw an earlier post about this dating back to 2006 where someone made some code to make it work but being such and old page the link was no longer active.