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 4 made on Saturday December 15, 2007 at 06:35
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Don't know what the original value of the label is but I will assume it was an empty string or possibly text. You most likely were trying to increment a value that was NaN (Not A Number).

FYI, It's Lyndel (one L at the end) and Barry, not Lyndell and Gordon.

Try this

onHold = function()
{
var x = CF.widget("COUNTER", "SCRIPTS", "RESOURCES");
var counter = 0;
if (x) counter = parseInt(x.label,10);
if (isNaN(counter)) counter = 0;

//bla bla
//some conditions
counter++;
x.label = String(counter).valueOf();
System.print(counter +"-"+ x.label);
};
onHoldInterval = 300;
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse