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 Friday December 14, 2007 at 19:14
sgtoma
Long Time Member
Joined:
Posts:
December 2007
73
Hi guys,
I am only a beginner and I started playing with this TSU9600 few weeks ago.

Can you please guide me through this?

I have a panel (PSname )COUNTER, and I try to use it to store an variable.
This is a test code based on my original function.



onHold = function()
{
var x = CF.widget("COUNTER", "SCRIPTS", "RESOURCES");
var counter = x.label;

//bla bla
//some conditions
++counter;
x.label = counter;
System.print(counter +"-"+ x.label);
};
onHoldInterval = 300;

My aim is to increase the counter and write it to the panel LABEL so that on next function execution,
my var counter
will take the incremented value from the widget's LABEL to start with .

What happens is that whatever value I put in the LABEL's field (ie 0), my function takes this value (0) every time it is executed.
In the debug window I can read the values of booth counter - x.label
1 -0
What am I doing wrong that the
x.label = counte;
doesn't actually take it's incremented value 1?

Any answer will be much appreciated.

Cheers

Sorin



,


Hosting Services by ipHouse