NSUndoManager works something like this: 1. The first time an action is registered, an undo group begins.
2. The group is scheduled to be closed using -[NSRunLoop performSelector:target:argument:order:modes:]. See the constants section of NSUndoManager for a little more detail. As simple as that :) On 4 Dec 2009, at 04:17, Graham Cox wrote: > As my undo woes continue and multiply, I'm working on my own undo > implementation, as least as a back-up strategy. > > One thing I'd like to do is to match NSUndoManager's ability to automatically > open and close groups as the run loop cycles. What's the best way to do this? > > What's needed is a way to call a class method of my undo manager at the start > and end of the every cycle of the main run loop, before any events are > dispatched. > > I notice that NSUndoManager has a 'run loop modes' property but it's unclear > where and how that is used. > > Thanks for any help, > > --Graham_______________________________________________ > > 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/cocoadev%40mikeabdullah.net > > This email sent to cocoa...@mikeabdullah.net _______________________________________________ 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