• 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: Searching a CoreData bound NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching a CoreData bound NSArrayController


  • Subject: Re: Searching a CoreData bound NSArrayController
  • From: chaitanya pandit <email@hidden>
  • Date: Sun, 12 Oct 2008 01:48:09 +0530

I had a similar problem actually,
I read on the list somewhere that creating a NSFetchRequest for finding something in the MOC can get slower if you have a lot of objects in your MOC(few thousand), and in such case using an array controller 's array and using predicate to filter it's contents can gain some performance improvements.
But i had a problem using the array controller especially with the table views, what happens is that if you add an object in to the MOC the arraycontroller's contents do not get updated in the same event cycle, so if you are implementing a data source to provide data to the table view and use the array controller to provide arranged objects, then calling reloaddata on the tableview after inserting new object, doesn't reflect the new objects in the table view.
I actually observed that the first approach is a bit faster than creating a NSFetchRequest


On 11-Oct-08, at 1:43 PM, Paul Thomas wrote:

Hi All,

I need a little advice on the "right way" to do something: I have an array controller bound to a core data store and the objects are presented in a table view. When it comes to inserting, I need to check that one of the properties specified by the user is unique before doing anything else. So in my view controller, should I be:
- looking through the NSArrayController for a match
- using the moc attached to the array controller to do a fetch?


I suspect the latter, but I want to check that I haven't missed a simpler solution.

ta,
pt.
_______________________________________________

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

_______________________________________________

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: 
 >Searching a CoreData bound NSArrayController (From: Paul Thomas <email@hidden>)

  • Prev by Date: Re: Invoking 'a Paste' Programmatically
  • Next by Date: CATextLayers text alignment?
  • Previous by thread: Searching a CoreData bound NSArrayController
  • Next by thread: NSURLConnection question
  • Index(es):
    • Date
    • Thread