PennController for IBEX › Forums › Support › Convert Var/Text to String for get-method › Reply To: Convert Var/Text to String for get-method
May 9, 2023 at 5:06 am
#10526
Keymaster
Hello Christin,
You cannot use a reference to a PennController element inside a getX command, because the execution of (plain) JavaScript is immediate, but that of PennController commands is delayed
What you can do is use a Function element in which you manipulate the PennController elements by accessing their methods and attributes:
getButton("B1")
.callback( newFunction( ()=>{
try { getCanvas( getVar("canvasnr")._element.value ).visible()._runPromises(); }
catch (e) { }
}).call() )
Jeremy