I don’t know if this is a issue of some sort of it I am doing something wrong. Issue is I am just embedding Cocoa control
in a small test, returning the handle of it and all that. I just put on simple NSButton to test.
Issue is no matter what I do I can always tab onto it and get focus.
I set setRefusesFirstResponder to YES
REAL Control flags are set as follows: REALenabledControl | REALcontrolIsHIViewCompatible,
[quote][…]
controlAcceptFocus: This callback is called whenever the framework wishes to know whether your control can accept focus or not. If you have the REALcontrolAcceptFocus flag specified in the control definition, then this method is never called since it is assumed the control can always accept focus. Called only at runtime.
[…][/quote]
As a major plugin developer for Xojo then I obviously know those things.
From my post above then:
“REAL Control flags are set as follows: REALenabledControl | REALcontrolIsHIViewCompatible,”
So the focus flags are not on the control.
And this case is not about normal control anyhow, its about Embedding of native Cocoa control in which case in the SDK you pass the hands to Xojo and Xojo takes owner ownership.
I didn’t know that one would wire into the native control.
It was implemented since it was copy paste of implementation of other non native control, but it was only connected to the enabled state of the control