Re: [CoreData] Background Insertion
Re: [CoreData] Background Insertion
- Subject: Re: [CoreData] Background Insertion
- From: Andrew Kimpton <email@hidden>
- Date: Tue, 5 Jun 2007 17:51:17 -0400
On Jun 5, 2007, at 3:56 PM, Andrew Kimpton wrote:
On Jun 5, 2007, at 3:15 PM, Marcus S. Zarra wrote:
This is very odd. I did get it to work by changing your
dataSaved: method to:
[listController prepareContent]; //MSZ Added
As to why this is necessary, I am stumped. It should be picking
it up automatically. This solves it but I am not sure if you want
to do something like this. Although having your delegate
broadcast a "data updated" notification might solve the issue.
When I do background processing, I close all of the windows that
display the data and bring up a progress dialog which is modal.
So I am probably not seeing this behavior because the controller
reload when the windows get presented. Now I will have to go back
into my code and see if I can duplicate this behavior and join you
in a radar filing...
Cool.... now I get valid objects - and the exact same symptoms
described above. At least I think it's the same I'm not able to so
easily verify that sending prepareContent fixes the problem - I
have a number of controllers and I don't generally have them
registered with any window controller that's also receiving the
completed save notification. I'll try that next...
I found that updating just one of my controllers seems to be enough
to cause 'everything' to come to life. Sending a prepareContent
message seems to trigger a notification that my regular
observeValueForKeyPath receivers pick up.
So.....
Use objectForID to fault the newly inserted items in the main thread
Use prepareContent on a controller to trigger updates for everyone (?)
Problem (mostly - if not cleanly) solved - it still feels like the
prepareContent shouldn't be needed.
Andrew 8-)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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