An object needs to be submitted to the server, and I want to indicate to the user that the object needs to be submitted by displaying the lastModified
date/time, and lastSubmitted
date/time.
(Yes, the record must be manually submitted.)
I'm currently listening for NSManagedObjectContextObjectsDidChangeNotification
, checking if the object's entity is RetailLocation
, and if so, setting its lastModified
date/time (of course, only if lastModified
is not the only property being modified). Since this seems to highly confuse the undo manager, I use performSelector:SOMESEL withObject:retailLocation afterDelay:0.0
to set the lastModified
property.
Sadly, this is almost even worse: this results in two actions being added to the undo stack!
Can someone recommend a nice way to implement a lastModified
attribute in a Core Data-managed record? Alternatively, what am I missing?