• 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: Disable PDFView context menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable PDFView context menu


  • Subject: Re: Disable PDFView context menu
  • From: Keary Suska <email@hidden>
  • Date: Mon, 26 Mar 2012 13:47:05 -0600

On Mar 26, 2012, at 12:41 PM, Antonio Nunes wrote:

> On 26 Mar 2012, at 19:09, Nick wrote:
>
>> However, I still can't receive -rightMouseDown message. I am returning
>> "nil" in the method -(NSMenu*)menuForEvent, which disabled the context
>> menu.
>> But how can I process right-mouse-button clicks?..
>
> PDFView doesn't play very nice with clicks. If you allow PDFView to intercept a mouseDown (i.e. not overriding it), then you pretty much lose control over the whole click tracking. I suppose you can override mouseDown: and query the event for buttonNumber and use that to recognize a right mouse down (NSRightMouse). (Haven't tried this myself though.)


AFAIK you shouldn't get a mouseDown call for a right click, only a left click, but you can verify that with breakpoint. It is likely the event is being filtered out higher in the event handling chain...

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

  • Follow-Ups:
    • Re: Disable PDFView context menu
      • From: Nick <email@hidden>
References: 
 >Disable PDFView context menu (From: Nick <email@hidden>)
 >Re: Disable PDFView context menu (From: Keary Suska <email@hidden>)
 >Re: Disable PDFView context menu (From: Nick <email@hidden>)
 >Re: Disable PDFView context menu (From: Nick <email@hidden>)
 >Re: Disable PDFView context menu (From: Antonio Nunes <email@hidden>)

  • Prev by Date: Re: Disable PDFView context menu
  • Next by Date: Re: Disable PDFView context menu
  • Previous by thread: Re: Disable PDFView context menu
  • Next by thread: Re: Disable PDFView context menu
  • Index(es):
    • Date
    • Thread