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 5 made on Thursday March 5, 2009 at 11:10
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,003
EscientPronto takes 3.5 seconds to start up as it is 300K+ of source code. You are correct that it is likely compilation time.

this code will save you some time and cut down on size of script.
note that this[varname] declares a field in the object where script(function) is located (Page or Activity).

function d(varname,tag,v)
{
var w = GUI.widget(tag);
if (w) w.visible=(v!==0);
this[varname]=w;
}
d("but11", "but11", 1);
d("b11o1","11o1",0);
etc...

Note that you could also define a panel that contained string with multiple lines

butt11|butt11|1
b11o1|11o1|0

Then, immediately following compilation, write a function to split() the string as needed and then loop through the values calling function d() above. This way, you minimize compilation time but may still incur overhead parsing the string the first time through.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse