I've been trying to debug some errors I was getting with a ProntoScript object I was fiddling with, and I boiled it down to this:
function Device() {
this.sendCommand = function(s) {
System.print("command: " + s);
};
this.pollPower = function() {
this.sendCommand("pollPower");
};
}
var proj = new Device();
scheduleAfter(10, proj.pollPower);
This produces:
TypeError: this.sendCommand is not a function
If I change the this.pollPower method to call proj.sendCommand, everything works.
I also directly copied the library example from the philips doc (the SampleLib timer) and got similar errors. Any ideas what I'm doing wrong here?
This is with ProntoEdit 2.4.23, and I get the same results ont he remote or in the simulator.
-mike
Last edited by mlorenzen on May 21, 2011 15:28.