FilterPredicate binding not automatically updated?
FilterPredicate binding not automatically updated?
- Subject: FilterPredicate binding not automatically updated?
- From: Charilaos Skiadas <email@hidden>
- Date: Tue, 12 Jul 2005 16:17:24 -0500
Before giving details of the problem, let me try to describe it in
general terms: I have an array controller bound to an entityA through
its managedObjectContext, set to automatically update etc. I have set
for it a filterPredicate binding, which does the following: Checks
all objects of entityB, looks at their "item" relationship, which is
a to-one relationship to entityA with to-many inverse, and returns NO
if the given object of entityA is one of those obtained this way. So
in code, the filterPredicate is:
return [NSPredicate predicateWithFormat:@"NOT (SELF IN %@)",
[self valueForKeyPath:@"weightedSubitems.item"]];
This works pretty well overall, except for a small snag. If I delete
one of those entityB objects, the controller is not updated. Well,
actually, what I am seeing is that a table view, one of whose columns
is bound to this controller doesn't get updated. If on the other hand
i add an object to the entityB objects, then the controller gets
updated, and in fact remembers the deletion.
At least this is my understanding of the problem, maybe it is caused
by something else in my app. Any thoughts on what the problem might
be, or how to tell my controller that something has changed?
Haris
_______________________________________________
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