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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to