Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching Command-N without any open windows?



Hi,

I guess your application should have a (global) menu bar even when there are no open windows. Command-N is then just a short cut for the corresponding menu entry. You can simulate the global menu bar without having a window by creating an off-display window. The menu of this off-site window can then be used when no application/document windows are open.

Cheers

--Bruno

On 03.05.2006, at 20:42, Bill Janssen wrote:

Hi.  I've got a Swing document viewer app that may or may not have
open windows (documents).  I'd like to bind Command-N to pop up a new
query window (to seach for new documents) and have it work even if
there are no open windows.  Generating a ReOpenApplication event would
be fine.  But I don't see how to bind key actions without a Window to
bind them to.  I'm hoping I don't have to mess around trying to give
focus to an invisible window when there are no other open windows.

Bill


------------------------------------------------------------------------
Bruno Schaeffer                                   Tel: ++41 61 228 94 44
Canoo                                             Fax: ++41 61 228 94 49
Kirschgartenstrasse 7
CH-4051 Basel
http://www.canoo.com                           email@hidden

Beyond AJAX - Java Rich Internet Applications   http://www.canoo.com/ulc
------------------------------------------------------------------------


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Catching Command-N without any open windows? (From: Bill Janssen <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.