Unfortunately this only works once, the inp value is correctly displayed in the label.
Howeverit seems the process in the cordova is then stopped.
How can I mke the feed continous ?
Any help is appreciated.
D
Daniel Guttenberg
said
about 7 years ago
Hi Marcus,
The setTimeout function only executes the given callback once. If you wish to update your label continuously you may use the setInterval function. It takes a callback function and a time interval in milliseconds as its input parameters.
Here is a trivial ARchitect world showcasing its usage:
var World = {
init: function initFn() {
var func = function foo() { console.log("foo called."); }
setInterval(func, 100);
}
};
World.init();
Output:
foo called.
foo called.
foo called.
foo called.
foo called.
...
I believe this behaviour is what you tried to reproduce with the code you provided.
Kind Regards
Daniel
M
Marcus Schiffer
said
about 7 years ago
Hi,
thanks. I tried with setInterval, semms to work now.
Marcus Schiffer