Re: Searching a CoreData bound NSArrayController
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