• 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
Making menu bar application's window key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making menu bar application's window key


  • Subject: Making menu bar application's window key
  • From: Justin Williams <email@hidden>
  • Date: Sat, 5 Nov 2005 01:17:25 -0500

Greetings,

I am adding keyboard access to my menu bar based to-do list application so that users can bring the application forward no matter what application they are in.

When the user presses their hot key or clicks the menu bar icon to launch the application, the application launches as it should and posts a notification letting me know that the window has application's main window has dropped down.

From here the user should be able to use the arrow keys to navigate the outline view and manipulate data. Unfortunately, the previous application they were working in still has the focus of the keyboard.

When the notification posts letting me know the main window has dropped this code is executed:

-(IBAction)checkOffActivated:(id)sender {
	[oWindow makeKeyAndOrderFront:self];
	[oOutlineView selectRow:1 byExtendingSelection:YES];
}

While the row is selected in my column view, the oWindow window still doesn't have the focus of the keyboard until I click the mouse on it. If you would like to see this in action (its somewhat difficult to explain) you can download this beta of the application:

http://www.carpeaqua.com/co35a1.zip

To summarize, I don't understand why calling makeKeyAndOrderFront isn't giving my window the focus as it should.

Any suggestions are welcomed.  Thanks.

__________________________________________________
Justin Williams                             email@hidden
work: www.maczealots.com      play: www.carpeaqua.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


  • Follow-Ups:
    • Re: Making menu bar application's window key
      • From: Daniel Jalkut <email@hidden>
    • Re: Making menu bar application's window key
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: Re: change dock icon of a non active application?
  • Next by Date: any way to notify a program when the system enters or leaves idle?
  • Previous by thread: Re: change dock icon of a non active application?
  • Next by thread: Re: Making menu bar application's window key
  • Index(es):
    • Date
    • Thread