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: Jason Foreman <email@hidden>
- Date: Thu, 3 Dec 2009 23:13:25 -0600
On Dec 3, 2009, at 10:17 PM, Graham Cox wrote:
> 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?
Possibly by using a CFRunLoopObserver. You can look into CFRunLoopObserverCreate and the related documentation. This will allow you to observe various stages of the run loop cycle.
> I notice that NSUndoManager has a 'run loop modes' property but it's unclear where and how that is used.
The modes are basically filters for which input sources get processed by a run loop cycle. There is a run loop mode used by modal panels and another for mouse tracking. An undo manager could use this mode to avoid (or explicitly allow) registering undos during a mouse drag, for example.
Jason
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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