Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Thursday May 19, 2011 at 22:56
mlorenzen
Lurking Member
Joined:
Posts:
January 2009
2
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.


Hosting Services by ipHouse