• 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: Notifications on main thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notifications on main thread


  • Subject: Re: Notifications on main thread
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Thu, 20 May 2010 22:39:54 -0700

On May 19, 2010, at 4:02 AM, Jonny Taylor wrote:

> I've noticed a slight issue (with both NSInvocation and NSOpQ) when a menu is pulled down and posting styles NSPostASAP or NSPostWhenIdle are used. While the menu is visible, the notifications are posted ok (on the main thread), but objects do not receive the notifications until the menu is released. I don't quite understand why this should be (is the main loop not running when a menu is displayed, or are menu-related events somehow jumping the queue and preventing my notifications from reaching the head of the queue?).

Not quite; the main runloop is running in a different mode, likely NSEventTrackingRunLoopMode.  Try enqueuing your notification with an array of specific modes, or maybe NSRunLoopCommonModes.

--
Adam

_______________________________________________

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: 
 >Notifications on main thread (From: Jonny Taylor <email@hidden>)
 >Re: Notifications on main thread (From: Nick Zitzmann <email@hidden>)
 >Re: Notifications on main thread (From: Michael Ash <email@hidden>)
 >Re: Notifications on main thread (From: Jonny Taylor <email@hidden>)

  • Prev by Date: Re: EPS image in NSScrollView
  • Next by Date: Re: NSWindowController for Prefs XIB Question (Core Data involved)
  • Previous by thread: Re: Notifications on main thread
  • Next by thread: Re: Notifications on main thread
  • Index(es):
    • Date
    • Thread