Reply To: Convert Var/Text to String for get-method

PennController for IBEX Forums Support Convert Var/Text to String for get-method Reply To: Convert Var/Text to String for get-method

#10526
Jeremy
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