• 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: Contextual menus, views, and the Control key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contextual menus, views, and the Control key


  • Subject: Re: Contextual menus, views, and the Control key
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 30 Apr 2003 01:16:52 -0700

On Tuesday, April 29, 2003, at 10:55 PM, Dix Lorenz wrote:

But I realize that there's a whole lot of people out there who have single button mice and use the Control key to get contextual menus, and so I'd like to get my solution working with Control-clicking as well as the right mouse button. My problem is I can't figure out which NSView/NSResponder method gets called when a user Control-clicks the view. I already tried -mouseDown: and it mysteriously isn't called at all. It's obviously not -rightMouseDown: either.

Have you tried overriding NSView's

- (NSMenu *)menuForEvent:(NSEvent *)theEvent

Aha, that works. Thanks!

Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://dreamless.home.attbi.com/

"Building the future and keeping the past alive are one and the same thing." - Metal Gear Solid 2
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Contextual menus, views, and the Control key (From: Dix Lorenz <email@hidden>)

  • Prev by Date: Re: NSImage rendering upside down
  • Next by Date: remove alpha channel from bitmap
  • Previous by thread: Re: Contextual menus, views, and the Control key
  • Next by thread: mounting idisk?
  • Index(es):
    • Date
    • Thread