FROM : mmalc crawford
DATE : Tue Jan 01 18:48:07 2008
On Jan 1, 2008, at 9:38 AM, Ture Pålsson wrote:
> In the thread that adds the objects, I do [moc save: &saveError] every
> now and then.
>
> I subscribe to NSManagedObjectContextDidSaveNotification. In the
> notification handler, I extract the object ID:s of the inserted
> objects and pass them to a method on the main thread (using
> performSelectorOnMainThread). On the main thread, I loop over the
> objectID:s and... well, what *should* I be doing here? I tried just
> accessing the objects with [moc objectWithID:]. No luck. I tried
> calling [moc refreshObject: mergeChanges:] for the objects I got by
> objectByID. No luck. I tried executing fetch requests for those
> objects. No luck.
>
Are you actually getting back the new objects when you execute the
fetch?
Are you sending the array controller a fetch: message?
mmalc
DATE : Tue Jan 01 18:48:07 2008
On Jan 1, 2008, at 9:38 AM, Ture Pålsson wrote:
> In the thread that adds the objects, I do [moc save: &saveError] every
> now and then.
>
> I subscribe to NSManagedObjectContextDidSaveNotification. In the
> notification handler, I extract the object ID:s of the inserted
> objects and pass them to a method on the main thread (using
> performSelectorOnMainThread). On the main thread, I loop over the
> objectID:s and... well, what *should* I be doing here? I tried just
> accessing the objects with [moc objectWithID:]. No luck. I tried
> calling [moc refreshObject: mergeChanges:] for the objects I got by
> objectByID. No luck. I tried executing fetch requests for those
> objects. No luck.
>
Are you actually getting back the new objects when you execute the
fetch?
Are you sending the array controller a fetch: message?
mmalc






Cocoa mail archive

