mousedown and REALCocoaViewCallbacks?

[quote=314685:@Christian Schmitz]And with REALCocoaViewCallbacks I provide mouseDown to the framework. But I miss the framework providing me the MouseDown event for the user of my plugin class.

So should I add my own MouseDown/MouseUP or is that a bug?[/quote]

Ah. As far as I know, this is how the plugins SDK has always treated plugin controls and has nothing to do with REALCocoaViewCallbacks specifically. Exposing mouse events to users has always required plugins to declare their own events and call it from the related REALcontrolBehavior function.

[quote=314685:@Christian Schmitz]And with REALCocoaViewCallbacks I provide mouseDown to the framework. But I miss the framework providing me the MouseDown event for the user of my plugin class.

So should I add my own MouseDown/MouseUP or is that a bug?[/quote]

If you use the internal MouseDown event then you need to provide new one for your user.

If your control is NSView then you need to provide your own. (Thats how I always did it anyhow)

REALCocoaViewCallbacks I never used.

me neither.

Maybe I am the only one for REALCocoaViewCallbacks.
And I think for hosting a NSView it provides the required support for proper focussing.

I do proper focusing on the SearchControl which is NSView

A handful of Xojo’s built-in controls use it and focus is handled correctly.

I believe that there’s a bug with the Plugin’s MouseDown handler, though: The coordinates of the passed x + y values should be relative to the Control - at least that’s the case for other Xojo controls like ListBox. However, MouseDown of a Plugin Control Christian just added gives me window-relative coords, just like “me.MouseX/Y” would give. That’s not right,
is it?
Or does the plugin have control over the call of the MouseDown event, i.e. would it be Christian’s code that has to pass the correct x/y?

Unfortunately plugins have to adjust by the bounds from REALGetControlBounds.

Ah, thanks for clarifying that - Christian is already on it.

REALGetControlBounds is built in.

Thanks to Thomas pushing me, I learnt a ton of things about Xojo controls!