Not seeing rightMouseDown: - what are the docs actually saying ?
Not seeing rightMouseDown: - what are the docs actually saying ?
- Subject: Not seeing rightMouseDown: - what are the docs actually saying ?
- From: Aandi Inston via Cocoa-dev <email@hidden>
- Date: Fri, 18 Oct 2019 22:10:45 +0100
I believe I may be seeing an effect described in the Cocoa docs for the
rightMouseDown:
method. I am unsure exactly what the docs are saying however. Symptom:
compiled for
64-bits, an unhandled rightMouseDown: is eventually sent to the NSWindow
subclass,
but compiled for 32-bits (and run on 10.11.6 at least) the event never
arrives.
For NSView, we see "In macOS 10.7 and later, if the event is not handled,
this method
passes it up the responder chain." For NSResponder we see "Prior to OS X
v10.7, NSView
did not pass unhandled rightMouseDown: events up the responder chain. In
macOS 10.7 and
later, NSView passes rightMouseDown: events up the responder chain if
AppKit doesn’t
find an associated context menu to display for the view. To avoid binary
compatibility
issues, this new behavior is enabled only for applications linked on macOS
10.7 or
later."
But what is the actual test for whether to do this? "Running on" and
"linked on" are
both 10.11. Is it actually looking at the "Deployment target"? To make
matters worse,
my code is running as a plug-in and I'm going to take a guess that if a
deployment
target applies, it is the one selected in the main executable (not under my
control)
rather than the plug-in... can anyone explain what Cocoa would be looking
at?
And if it turns out that I'm not going to get rightMouseDown: sent directly
to my
NSWindow, is there any alternative to subclassing any NSView or descendent
(including
NSControls of various flavours) that might be the initial responder?
Thanks in advance!
_______________________________________________
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