On Sat, Jul 5, 2008 at 8:14 PM, Kanny <[EMAIL PROTECTED]> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]