Hi, thanks, yeah, I had checked properties before like you suggested earlier. And I see how it has extra code to not make the new properties behaviour affect all canvases. I think I'm ok with that. But I can just use that same logic and put the
tcl code instead. I have other issues when trying to achieve my goal.
You see, for what I get, [propertybag] uses "
class_setpropertiesfn" (declared in m_pd.h and the way to create properties for externals) to add a different properties behaviour, and then hack it to overwrite the behaviour of a canvas. But I'm after removing properties instead off adding them.
So this needs to be accessed and hacked earlier than the stage we're accessing the properties, like when we capture a right click! This seems to be done in
g_editor.c in the
canvas_rightclick function. If there was a way to set rightclick function in Pd headers, this would be easy and done, but none of this is
declared in the Pd headers...
In its turn,
canvas_rightclick calls the "
::pdtk_canvas::pdtk_canvas_popup" function in
tcl/pdtk_canvas.tcl, and we can mess with that by overwritting it, as the kiosk plugin does. Overwriting it seems to be the only way I can imagine to do this. I can't overwrite
canvas_rightclick or other code from
g_editor.c, right?
But how to overwrite it only when I'm dealing with a particular canvas? I can't find the answer to this by checking propertybang, and I'm not even sure it can be done in any way.
Please tell me if I'm missing something obvious and an answer to that within the code of propertybang
Thanks