• 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
NSArrayController fetchPredicate behaving badly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArrayController fetchPredicate behaving badly


  • Subject: NSArrayController fetchPredicate behaving badly
  • From: Jamie Hardt <email@hidden>
  • Date: Thu, 11 Sep 2008 09:29:55 -0700

I'm having some difficulty with an NSArrayController that fetches a subset of all the entities in my NSManagedObjectContext, and I think it might be something simple, but I haven't been able to put my finger on it...

I have two entities, "Reels" and "Scenes". Reels have many Scenes; reels have an "isHidden" attribute. The array controller I'm having trouble with fetches scenes that are in reels that are not hidden, thus it's fetch predicate (in IB, and I've done this programatically) is "reel.isHidden == NO".

When I open a document, the ArrayController finds the correct scenes, the ones in unhidden reels. If I hide one reel and show another (by clicking checkboxes bound to the isHidden attribute on reels, the array controller persists in showing the scenes for the hidden reel (this is the problem). The array controller refuses to find the scenes in the unhidden reel no matter how many times I order it to fetch: or fetchWithRequest:
UNTIL I save the document, at which time the array controller realizes what's been going on and fetches the correct scenes.


Is my predicate right? I can't help thinking there's something goofy going on in my NSManagedObjectContext, something not being committed or updated or something.

On a side note, does anyone know why I can't see the fetchPredicate for an NSArrayController in the debugger? No such member seems to exist.

Thanks
Jamie Hardt
The Sound Department
http://www.soundepartment.com/
http://www.imdb.com/name/nm0362504/

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSArrayController fetchPredicate behaving badly
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Regarding the array controller
  • Next by Date: Re: Cocoa application running very slow under 64 bit
  • Previous by thread: Re: Core Data Migration Progress
  • Next by thread: Re: NSArrayController fetchPredicate behaving badly
  • Index(es):
    • Date
    • Thread