I've run into a problem where I need to use the
sendActionOn method of NSButton
and i'm getting the error
Objective-C stub for message `sendActionOn:' type `q@:Q' not precompiled. Make sure you properly link with the framework or library that defines this message.
When compiling with the 10.12 SDK, it works on fine on 10.12, but fails on 10.11 and 10.10. Using the 10.11 SDK, it fails on 10.12 as well.
Based on other threads, I tried using the
performSelector method, but you can't because
sendActionOn has a return value. So I was forced to use an
NSInvocation. This currently works:
theSelector = 'sendActionOn:'
pointer = Pointer.new(:object)
pointer = NSLeftMouseDownMask
aSignature = NSButton.instanceMethodSignatureForSelector(theSelector)
anInvocation = NSInvocation.invocationWithMethodSignature(aSignature)
But I would much prefer using
sendActionOn directly. Is this maybe an RM bug? Using RM 4.17 and XCode 8.2.1