I am using a template canvas with multiple template instances in it. I would like to access the properties of this template canvas on click of button inside the instance. Currently, I am using following code to access the template canvas and then its properties:
templateCanvas = system.gui.getParentWindow(event).getRootContainer().getComponent(templateCanvasName) property = templateCanvas.propertyName
while it is working fine, it will break if the template canvas is moved inside another container. To circumvent this issue, passing the absolute path of template canvas to template instances through templates dataset property is one of the options I can think of.
But is there any other way to get the reference of template canvas without using the name? something similar to