• 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: Running event loop while showing non-standard popup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Running event loop while showing non-standard popup (From: Steve Mills <email@hidden>)
 >Re: Running event loop while showing non-standard popup (From: Ken Thomases <email@hidden>)
 >Re: Running event loop while showing non-standard popup (From: Steve Mills <email@hidden>)
 >Re: Running event loop while showing non-standard popup (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Running event loop while showing non-standard popup
  • Next by Date: NSSplitView: Many subviews and ViewControllers, best practices
  • Previous by thread: Re: Running event loop while showing non-standard popup
  • Next by thread: Re: Running event loop while showing non-standard popup
  • Index(es):
    • Date
    • Thread