Core Data and Run Loops
Core Data and Run Loops
- Subject: Core Data and Run Loops
- From: Jonathan Dann <email@hidden>
- Date: Wed, 30 Apr 2008 09:49:09 +0100
Hi All,
I'm now learning Core Data and was working through the persistent
document tutorial when I hit a snag.
After following the advice in the "Adpoting the Mediator Pattern" the
object controller now simply prepares its content and fetches the
department object.
I then tried in my windowControllerDidLoadNib method to use the array
controllers add and insertObject:... methods to populate the context
after all had loaded but got an exception when _NSStateMarker was sent
mutableCopyWithZone: which it didnt recognise. When using
performSelector:withObject:afterDelay:it worked fine.
I thought that since the add: method and its counterparts were
deferred until the next run loop anyway I wouldn't have to do this. Is
there something happening in the background when the controllers set
up their bindings to the context, meaning they're not set in when
windowControllerDidLoadNib: is called? I'm sure I read something in
the core data guide about run loops and performing after delays but I
may be wrong.
Thanks,
Jon
_______________________________________________
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