• 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
Smart Lists (smart folders, smart groups,...) with Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Smart Lists (smart folders, smart groups,...) with Core Data


  • Subject: Smart Lists (smart folders, smart groups,...) with Core Data
  • From: zeno <email@hidden>
  • Date: Tue, 15 Nov 2005 15:30:16 +0100

Apparently Fetched Properties are the simplest way to do smart lists
(à la iTunes or Mail.app) in a Core Data application. But there're
basically two problems when using Fetched Properties in this scenario:
1) no true "Live Update" feature (FP are not dynamic and don't update
when the destination is updated)
2) no true "Edit Smart List" feature (search terms content can be
edited, but not the criteria structure)

I have a working sample application and I managed to "fix" the two
problems with the following "workarounds":

1) programmatically call
refreshObject:(selectedSmartGroupObject)mergeChanges:(YES) when some
changes occur in the destination or when the smart group is selected
(this causes the fetch request associated with the fetched property to
be re-executed).
(Note: this is not actually a "workaround", it's proper and documented
code, but I still call it "workaround" because in the modern era of
bindings and C.D. where everything is dynamic, I feel a bit "grandpa"
having to manually refresh the source...but that's another story)

2) "fake" the Edit behaviour by deleting and recreating a new smart list

My question is:
Am I doing something I shouldn't? Could I do it better? Is there a
more appropriate way of doing this?
 _______________________________________________
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

  • Follow-Ups:
    • Re: Smart Lists (smart folders, smart groups,...) with Core Data
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: DC Metro area User Group?
  • Next by Date: Add a framework
  • Previous by thread: Re: Core Data inverse relationships
  • Next by thread: Re: Smart Lists (smart folders, smart groups,...) with Core Data
  • Index(es):
    • Date
    • Thread