• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to hook into the run loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Best way to hook into the run loop?
      • From: Graham Cox <email@hidden>
References: 
 >Best way to hook into the run loop? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Outline View.
  • Next by Date: Fwd: applicationShouldTerminate problem
  • Previous by thread: Best way to hook into the run loop?
  • Next by thread: Re: Best way to hook into the run loop?
  • Index(es):
    • Date
    • Thread