Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Grab keyboard focus?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grab keyboard focus?



I'm new to Mac OS programming, so please bear with me! :-)

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.

makeKeyAndOrderFront failed to bring the window to the front, and the
solution I found was to get the window level to NSModalPanelWindowLevel,
before invoking NSApp run (Or runModalForWindow:).  Unfortunately, the
keyboard focus remains with the previous application.

Is there anyway to force the keyboard focus to this application?  I've
tried Google and the Apple website, but I haven't managed to find
anything relevant.

Many thanks,

Ben
 _______________________________________________
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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.