• 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: Delayed perform never performing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delayed perform never performing


  • Subject: Re: Delayed perform never performing
  • From: James Walker <email@hidden>
  • Date: Fri, 24 Aug 2018 13:09:30 -0700

On 8/24/18 11:21 AM, James Walker wrote:
What could cause a delayed perform (using -[NSObject performSelector: withObject: afterDelay:]) to never happen?  The requested delay is 0.175. I've checked that it's being issued from the main thread, and I've checked that cancelPreviousPerformRequestsWithTarget: is not being called.  I wondered if I needed to do the delayed perform in a particular run loop mode, and found that [[NSRunLoop currentRunLoop] currentMode] is nil, which seems odd.  Why would the run loop not be running?

Never mind, I figured it out. I had to add inModes: @[NSModalPanelRunLoopMode]. The code had been working when my formerly-Carbon app was using RunApplicationEventLoop, but now that I've switched to NSApplicationMain, apparently modal loops have started using NSModalPanelRunLoopMode.
_______________________________________________

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

References: 
 >Delayed perform never performing (From: James Walker <email@hidden>)

  • Prev by Date: Re: Carbon -> Cocoa
  • Next by Date: Re: Delayed perform never performing
  • Previous by thread: Delayed perform never performing
  • Next by thread: Re: Delayed perform never performing
  • Index(es):
    • Date
    • Thread