Problems with a chain of bindings and search field
Problems with a chain of bindings and search field
- Subject: Problems with a chain of bindings and search field
- From: Michael McCracken <email@hidden>
- Date: Sun, 17 Jul 2005 18:25:29 -0700
Hi, I have a master-detail interface where I am dynamically switching
between detail views based on the selection in a master outilne view.
I have this set up with an NSArrayController in each 'child' detail
view controller class being bound to an ivar in the child controller,
and the master window controller binds that ivar to the selection
binding of the master NSTreeController when switching. I can unbind,
swap, and re-bind the child controllers and their individual bindings
would work fine.
Until I wanted to add a search field:
Each selected object in the tree controller is a kind of group that
has an 'items' relationship. What I want is for a global search field
to be able to handle searching through whatever items might be
selected, so I added a new NSArrayController next to the master
NSTreeController and bound it to the selection.items key path of the
tree controller, then bound the arrangedObjects of that new array
controller to the child controller's ivar. However, even without
adding in a search field to filter the array controller's objects, the
child views are no longer being updated.
I have the accessor for one of the child views printing out when it is
updated, and it happens only once - just the first time I add a data
item to the relationship.
Should I be doing this in a different way?
I was hoping to make it easy to write the detail controllers and
views, so that they could just get the appropriate pre-sorted array
from the master controller. This is turning into quite the learning
experience.
Thanks for any advice,
-mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden