Hello,

I'm using core data (sqlite) in a multi-user environment. With a little tweaking, each machine now has fresh data when it counts -- at least when I bind text fields (etc) to array controllers of managed objects -- the KVO seems to work almost by magic.

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.

I've tried a number of things including refreshObject, calling willChange and didChange for specific attributes of the preference record, releasing and nilling the preference record, performPendingChanges... all to no avail. I've thrown everything I can think of at it -- nothing results in fresh data. Obviously I can fetch fresh data but the textfields etc never update themselves.

How can I get the preference fields to get fresh data from the database?

Thanks,

Steve


ps. a couple of weeks ago someone posted that even after an MOC reset they still had stale data. I smugly replied that an MOC reset should do the trick. My apologies -- I'm chastened.

_______________________________________________

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

Reply via email to