• 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: Key equivalents for an action without a visible object item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key equivalents for an action without a visible object item


  • Subject: Re: Key equivalents for an action without a visible object item
  • From: Kanny <email@hidden>
  • Date: Sun, 06 Jul 2008 15:04:31 -0400

Thanks Michael, 



I had deleted that "MainMenu" NSMenu from the MainMenu.nib thinking I didn't need it as I had another NSMenu statusItem for my app. But putting it back from an empty project's nib file solved the issue. Now the textFields accept cut,copy and paste key equivalents and since i have set LSUIElement to 1, the Application-Menu doesn't appear.


-----Original Message-----

Message: 5
Date: Sat, 5 Jul 2008 21:27:55 -0400
From: "Michael Ash" <email@hidden>
Subject: Re: Key equivalents for an action without a visible object
    item
To: "Cocoa Developers" <email@hidden>
Message-ID:
    <email@hidden>
Content-Type: text/plain; charset=UTF-8

On Sat, Jul 5, 2008 at 8:14 PM, Kanny <email@hidden> wrote:
> Is it possible to define a key-equivalent for an action like in NSMenuItem but
without any visible object ?
>
> The situation is like this: I have a NSTextField in nib file of my
Application-Menu-less menubar app. I want it to receive Command-v for 'paste',
but since I don't have/want a menuItem to connect to FirstResponder's paste
method, it doesn't react in any way to Command-v. However the textfield is able
to receive paste method by Control-clicking and selecting from the system-wide
contextual menu.

I don't know what a "menubar app" is, but if it's anything like an
LSUIElement app then you can just create the menu item like you
normally would. The menu bar doesn't appear, but any time the app is
frontmost the key equivalents still function.

Mike


------------------------------









_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: plist parsing in c
  • Next by Date: Re: plist parsing in c
  • Previous by thread: Re: Key equivalents for an action without a visible object item
  • Next by thread: Keyboard Shortcut for "Stop"
  • Index(es):
    • Date
    • Thread