views:

198

answers:

1

How would I use a search box to filter a NSOutlineView/NSTreeController? I know it would have something to do with bindings and a predicate. But not specificaly how to. Could someone take me through the steps of filtering an NSOutlineView/NSTreeController?

+3  A: 

I don't think you can. NSArrayController allows you to give it a filter predicate; NSTreeController doesn't. I suggest you file a bug.

Peter Hosey
Could I filter the NSArrayController the NSTreeController is connected to, but would it display the results in the NSOutlineView?
Joshua
Just tried to file a bug but I just get an error when I log in, shows how good apples bug reporter is. http://snapplr.com/q3ns
Joshua
My guess is that filtering the array controller would only filter the root objects, not any descendant objects. I haven't tried it, but I can't see how it could work.
Peter Hosey
As for the bug reporter: Do you have an ADC account? You need one.
Peter Hosey
It works but only with the root objects is there any way to expand it to search the decendant objects?
Joshua
Yes, i do have an ADC account.
Joshua
So, Is there any way to make it search the decendant objects?
Joshua
Pretty sure I answered that already.
Peter Hosey
SO THERE IS NO WAY AT ALL TO FILTER THE DESCENDANT OBJECTS?
Joshua