Re: Notifications on main thread
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