10 Replies Latest reply on Jan 27, 2017 10:09 AM by carlesc RSS
    aelgov Apprentice

    Does ThingWorx has full support of setTimeout() service?

    Hi,

     

    Everytime I use setTimeout() function in all the option it can be used it throws an exeption: ReferenceError: "setTimeout" is not defined.

    I noticed also that the function inside the setTimeout DOES run, so I need to use try and catch in all the places.

     

    I wonder whether I use the wrong syntax for setTimeout, I think I tried them all


    setTimeout(nameOfFunction(),1000);

    setTimeout("nameOfFunction()",1000);

    setTimeout(nameOfFunction,1000);

    setTimeout("nameOfFunction",1000);

    setTimeout(function {nameOfFunction()},1000);

    setTimeout(new function {nameOfFunction()},1000);


    and some other options.

     

    I really don't want to use pause.

     

    It there any suggestion?