Hi mmalc, Thanks for your reply. I've answered your questions below.
On 26/12/08, mmalc Crawford wrote:
However, I have one entity that has only one record (for user preferences). I fetch the record fresh into its very own managedObjectContext for each access -- and even resetting the managedObjectContext. That direct binding, bypassing an arrayController, Never discovers database changes once the Preferences window is created.
(a) What did you bind to?
A managedObject singleton ivar, accessed via a getter method that does the reset, refreshObject:mergeChanges etc i.e, preferencesController.preferences.attributeName
(b) Have you tested to ensure that the managed object is being updated?
Good point. I only reset and refresh the managedObject when something asks for it. Per your question, I changed my testing to force it, by other means, to update and only then do I check the textField for fresh data. The results were that I confirmed that the managedObject is fresh but the textField doesn't show the change.
- Did you use refreshObject:mergeChanges:?
Yes.
- If so, is the context's staleness interval exceeded?
Yes. But I may add code that I use elsewhere to set the staleness interval, temporarily, to the shortest value. That said, at this point it appears that I have an update problem since the managedObject has fresh data.
Thanks again for your reply, mmalc. Confirming that the managedObject itself was fresh was a helpful idea. It also made me notice that some part of the freshening process is causing an optimistic locking error. More investigation...
Any further ideas appreciated. Cheers, Steve _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com