Ahh, that's interesting. I just checked and it seems that if you redefine the function with:
function touch(x,y) {
...
}
It should work (I didn't try this on the touchscreen, but I tried with setInterval, and something that looks a bit like the touchscreen handler).
However if you try edit then it does:
touch = function(x,y) {
...
};
And that doesn't work. I'll try and fix that (what edit does) in the next version though. Unfortunately I believe that touch = function() { ... } actually does the correct thing in not updating the function, only the pointer.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ahh, that's interesting. I just checked and it seems that if you redefine the function with:
It should work (I didn't try this on the touchscreen, but I tried with setInterval, and something that looks a bit like the touchscreen handler).
However if you try
edit
then it does:And that doesn't work. I'll try and fix that (what edit does) in the next version though. Unfortunately I believe that
touch = function() { ... }
actually does the correct thing in not updating the function, only the pointer.