On Wed, 2023-03-08 at 00:13 +0100, Roman Haefeli wrote:
As a follow-up on the matter, I identified to conditions that trigger a redraw:
* Loading a patch where some scalar objects like [draw{symbol,number,text}] or [{draw,filled}{curve,polygon}] are created before the [struct] oject of the template
* Loading a patch where the [struct] uses a template name containing $0 like $0.fruit (!).
$0 seems to be treated specially, since using $1, $2, etc. is not affected. Also, it doesn't help to put [struct $1 float x] into an abstraction [mystruct $0.fruit].
I thought I might could skip using $0 in structs by creating them as singleton and reference that (instead of the localized $0-version) in all instances of the abstraction. But then I noticed that I'm often using the outlet of [struct] to detect clicks.
Assuming I have spread scalars of the same [struct] to different canvases, is there a way to detect from the click message which canvas the click originates from? In other words: Is there some way to associate a pointer to a scalar with the containing canvas?
Roman