I thought I would try to do the necessary pre and post-processing using 
theĀ -willChangeValueForKey:withSetMutation:usingObjects: 
andĀ -didChangeValueForKey:withSetMutation:usingObjects: methods, and sure 
enough they get called at the right times, and work just fine for undo, but 
then when I redo, my Node objects come back as blank empty objects instead of 
being populated with my data.

Any ideas why this would be?

Essentially the flow is:
1. Create the child, which populates a bunch of things in the awakeFromInsert 
using primitive set methods.
2. Make some other changes to the object
3. Add it to the children (which triggers my post-processing)
4. Make some more changes to the object
(end of action)
Undo, which removes the child and triggers my pre and post processing to remove 
related items
Redo, which knows that there is an object to reinsert, but it has nothing 
populated - not even my initial values that were set originally in 
awakeFromInsert.

Surely the data should be populated in the object by this stage? I tried 
willAccessValueForKey:nil in case it was a fault, and checked isFault and 
isDeleted, but nothing helped.

Thanks

Ken_______________________________________________

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