Re: Best way to hook into the run loop?
Re: Best way to hook into the run loop?
- Subject: Re: Best way to hook into the run loop?
- From: Mike Abdullah <email@hidden>
- Date: Fri, 4 Dec 2009 15:19:06 +0000
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 (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden