Re: Distributed Notification observing change in Lion?
Re: Distributed Notification observing change in Lion?
- Subject: Re: Distributed Notification observing change in Lion?
- From: Matt Gough <email@hidden>
- Date: Thu, 08 Sep 2011 14:44:19 +0100
Thanks, that was exactly the problem
Matt
On 7 Sep 2011, at 17:38, Ben Gollmer wrote:
> On Sep 7, 2011, at 11:48 AM, Matt Gough wrote:
>
>> I have an observer for a Dist notification in my app. In Lion, my observer doesn't actually get called until I interact with my app in some way (i.e show a menu, or click on a window). Until I do that it doesn't get delivered.
>>
>> I have checked that the notification gets posted when I expect it from the app that sends it, but it seems to get stuck in limbo until a real event gets handled by my app. I am pretty sure it used to arrive almost immediately in 10.6.
>>
>> Any ideas?
>
>
> I think your scenario is covered by this section in the Foundation release notes:
>
>> Distributed notification delivery
>>
>> If you want a posted distributed notification to be received immediately, be sure you are passing the NSNotificationSuspensionBehaviorDeliverImmediately suspension behavior flag when registering for the notification, or using the NSNotificationDeliverImmediately flag when posting. Bugs in Mac OS X releases prior to 10.7 meant that sometimes a distributed notification would get delivered through to suspended observers, and not be properly queued, even when those flags weren't used.
>
> http://developer.apple.com/library/mac/#releasenotes/Cocoa/Foundation.html
>
> --
> Ben
>
>
_______________________________________________
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