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

Re: NSArrayController fetchPredicate behaving badly


  • Subject: Re: NSArrayController fetchPredicate behaving badly
  • From: Jamie Hardt <email@hidden>
  • Date: Thu, 11 Sep 2008 11:23:37 -0700

Yeah that worked.  Quirky is the word.

On Sep 11, 2008, at 10:42 AM, Keary Suska wrote:

9/11/08 10:29 AM, also sprach email@hidden:

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.

IIRC, this is expected behavior. Quirky, perhaps. What you probably want is
to apply the predicate also as a filter predicate. OTOH this should cause
the behavior you want

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


References: 
 >Re: NSArrayController fetchPredicate behaving badly (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: NSTask is Weird
  • Next by Date: Re: Trying to compile an ObjectiveC and C++ program in XCode 3.1
  • Previous by thread: Re: NSArrayController fetchPredicate behaving badly
  • Next by thread: creating new instance of coredata entity
  • Index(es):
    • Date
    • Thread