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 (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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to