• 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: refusing first clicks for entire app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: refusing first clicks for entire app


  • Subject: Re: refusing first clicks for entire app
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 8 Dec 2004 18:40:00 -0700


On Dec 8, 2004, at 6:28 PM, Ken Victor wrote:

NSButton returns true for acceptsFirstMouse. i'd prefer not to have this behavior and only have the first click activate my app. is there someway, other than subclassing all my buttons, and any other controls that may have similar behavior, to prevent first clicks from actually propagating to controls? (i'd still like to maintain the ability for clicks on the window controls - close, minimize, expand - to still operate while my app is inactive.)

You could register the object for the notification that is broadcasted when the window is no longer key (or implement the NSWindow delegate method), and then disable whatever controls you wish to disable when the notification selector is called. Of course, you'll also have to re-enable them when the window becomes key again, but it'll still take far less effort than subclassing.


Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >refusing first clicks for entire app (From: Ken Victor <email@hidden>)

  • Prev by Date: refusing first clicks for entire app
  • Next by Date: NSTask blocking GUI ?? (Bindings related?)
  • Previous by thread: refusing first clicks for entire app
  • Next by thread: NSTask blocking GUI ?? (Bindings related?)
  • Index(es):
    • Date
    • Thread