• 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
FilterPredicate binding not automatically updated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Understanding crashes
  • Next by Date: Re: Apple system icons: guidelines for use in Cocoa applications?
  • Previous by thread: Re: stringWithContentsOfURL doesn't work sometimes
  • Next by thread: Detecting when an NSStatusItem is present but obscured
  • Index(es):
    • Date
    • Thread