Looking at the javafx tutorials and samples, bindings are always made during varibale declarations:
def y = bind x;
or
def address = Address {
street: bind myStreet;
};
But what do I do, if I have an exisiting object - and hence don't declare it - and want to bind one of its attributes. In my case I load a SVGPath with the FXDLoader and then want to bind SVGPath.visible to a variable. How can I achieve this?
var data = true;
var fxdContent = FXDLoader.load("{__DIR__}plan.fxz");
var sc = fxdContent.lookup("SC0013") as SVGPath;
sc.visible = bind data; //That doesn't work