• 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: How to detect clicks outside of modal window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect clicks outside of modal window?


  • Subject: Re: How to detect clicks outside of modal window?
  • From: Scott Ribe <email@hidden>
  • Date: Thu, 03 Nov 2011 10:14:08 -0600

On Nov 3, 2011, at 9:58 AM, Vojtěch Meluzín wrote:

> Thanks. Ok, let's say I'm ok with "not making it modal". All I need is that
> when I show the window, the "method" that does that must return after the
> window has closed.

Well, that's modal unless you write your own event loop, which is probably not a good idea.

The more common Mac way would be to treat it like a sheet--in fact, you might be tempted to use a sheet, because you can position a sheet at locations other than the default, but I found some bugs there relating to the sheet being at the edge of a display--that you display the window with a call which immediately returns, event processing happens as normal, and when the sheet ends it invokes a callback.

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice




_______________________________________________

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

  • Follow-Ups:
    • Re: How to detect clicks outside of modal window?
      • From: Vojtěch Meluzín <email@hidden>
References: 
 >How to detect clicks outside of modal window? (From: Vojtěch Meluzín <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Scott Ribe <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Vojtěch Meluzín <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Laurent Daudelin <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Vojtěch Meluzín <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Scott Ribe <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Vojtěch Meluzín <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Conrad Shultz <email@hidden>)
 >Re: How to detect clicks outside of modal window? (From: Vojtěch Meluzín <email@hidden>)

  • Prev by Date: Re: How to detect clicks outside of modal window?
  • Next by Date: Re: NSTreeController won't initWithCoder on Leopard (solved)
  • Previous by thread: Re: How to detect clicks outside of modal window?
  • Next by thread: Re: How to detect clicks outside of modal window?
  • Index(es):
    • Date
    • Thread