Re: Running event loop while showing non-standard popup
Re: Running event loop while showing non-standard popup
- Subject: Re: Running event loop while showing non-standard popup
- From: Ken Thomases <email@hidden>
- Date: Tue, 21 May 2013 03:00:09 -0500
On May 21, 2013, at 1:58 AM, Kyle Sluder wrote:
> On May 20, 2013, at 8:06 PM, Steve Mills <email@hidden> wrote:
>
>> On May 20, 2013, at 13:19:51, Ken Thomases <email@hidden> wrote:
>>
>>> -[NSApplication runModalForWindow:] and either one of the -stopModal… or -abortModal methods. To detect a click outside of the browser window, you may need to add a local event monitor (+[NSEvent addLocalMonitorForEventsMatchingMask:handler:]) as well as monitoring the window's key status.
>>
>> Thanks a million, Ken. The window is running modally and that's great. The only thing is that mousedowns outside the modal window only beep and don't get caught by the event monitor. Should they, or is the very nature of runModalForWindow preventing that?
>
> The docs for +[NSEvent addLocalMonitor…] state that it does not work with nested event loops like the kind -[NSApplication runModalForWindow:] uses.
Oh. Oops. My apologies for the bad advice.
Regards,
Ken
_______________________________________________
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