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 Sunday January 27, 2008 at 10:11
Rene Lou
Long Time Member
Joined:
Posts:
January 2008
19
Hi

In the new TSU9600 firmware seems to be a bug:
using System.getGlobal() to retrieve a string you have saved with System.setGlobal(), you have to be aware that the current firmware is truncating your string by a number of characters - or worse - you get an error and your ProntoScript will fail. If the string gets truncated depends on the chars in your string: chars between "\x80" and "\xFF" will obviously not be counted as chars and your string will be cut at the end by the number of chars your string contains in that specific range (I did some test scripts and verified that range as 'problematic'). Eg: if you do the following:

System.setGlobal("test_string", "blabla" + "\xf2\xf3" + "blabla");
var tmp = System.getGlobal("test_string");
System.print(tmp);

your string tmp will look like "blabla" + "\xf2\xf3" + "blab"

The last "la" get's truncated and is lost (2 chars since there is \xf2 and \xf3 in the original string). There is another problem: If the 'to be truncated' character at the end happens to be exactly in the range of those characters ProntoScript seems to forget to count ("\x80"...."\xFF"), your script will fail and ProntoScript aborts and jumps to the home activity, eg:

System.setGlobal("test_string", "blabla" + "\xf2\xf3" + "b");
var tmp = System.getGlobal("test_string"); <<<<----- this line will fail

I stumbled across this error due to the fact that my surround processor (a Lexicon) is using "\xf2" as 'end of package' sign. Since I stored all lexicon commands in global variables (I parse a lexicon configuration file in ProntoScript just once and then store all version specific Lexicon commands globally; this allows a faster restart the second time I'm calling the Lexicon activity; all of those commands have the "\xf2" at the end and nothing worked initially with v4.0.17.......). Currently my ProntoScript code is near 10'000 lines in total.....
There is a workaround: just add a number of characters to the end of the string you want to store globally (I use some space chars " ") and when retrieving, cut the " " at the end - not nice but it's working.

Would be great if someone with connections to the Philips development team will bring this forward to them. This is an ugly error. Nevertheless I really appreciate the work they all have done so far and are really thankful they brought that great piece of HW & SW to the market - it's simply the best and adding ProntoScript is an absolutely brilliant idea!

Thanks
Rene


Hosting Services by ipHouse