Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with undo/redo and NSArrayController



I'm currently implementing undo/redo functionality in my app and I'm having problems with my NSArrayController. When adding an item to the array controller, I call from the documents undo manager:

prepareWithInvocationTarget: arrayController] removeObject: newObject];

Now this works fine for the undo functionality, but as soon as I try to redo the operation, nothing happens. So I guess the question is, what method does the redo functionality call?

I suspect that addObject may be called, but my app requires that any new have two of their properties set in order to work correctly. Could this be what is causing the problem?

Mike.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.