• 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: Grab keyboard focus?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grab keyboard focus?


  • Subject: Re: Grab keyboard focus?
  • From: Steve Checkoway <email@hidden>
  • Date: Sat, 20 May 2006 04:26:28 -0700


On May 20, 2006, at 3:07 AM, Benjamin Donnachie wrote:
I am writing a small GUI helper application that is invoked by a unix
style daemon when input is required. I need this application to pop up
on top of all other programs and grab the keyboard focus.

Such a thing is generally discouraged. (I don't know how many times I've had IM windows pop up while I'm typing passwords on other OSes causing me to type into the IM window.) A better way to request the user's attention would be the bouncing dock icon. I believe NSApplication's requestUserAttention: method is the way to do it.


http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSApplication.html#//apple_ref/ occ/instm/NSApplication/requestUserAttention:

- Steve

_______________________________________________
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


  • Follow-Ups:
    • Re: Grab keyboard focus?
      • From: Benjamin Donnachie <email@hidden>
References: 
 >Grab keyboard focus? (From: Benjamin Donnachie <email@hidden>)

  • Prev by Date: Re: Problems centering window
  • Next by Date: NSCell's floatValue
  • Previous by thread: Grab keyboard focus?
  • Next by thread: Re: Grab keyboard focus?
  • Index(es):
    • Date
    • Thread