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 6 made on Wednesday November 10, 2010 at 13:03
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
On November 10, 2010 at 01:42, BluPhenix said...
A library has to have a comment block at the beginning (nothing before it):

/*!
@title com.your.library.name
@version 0.1
@author Your Name
*/

Then you'll see it in the building blocks.

Lyndel the biggest limit of eval is that you have to update the label that is containing the code. With the libraries you just edit the library .js and it's done. (I frequently forget to use the reload from file button, let alone to update a label with code :). And Crockford says: eval is evil :).

Well, there are indeed some considerations. But, Crockford obviously does not write code for the Pronto. If you need dynamic compilation, it is the only way to accomplish this.

Once upon a time, Barry Gordon's script extraction tool would handle panel labels with script. Never used it that much but I do know it worked.

Note that in PEPv2, as labels are unicode, that will also limit your script block size to 32KB. As a result, I started using JS compression tools that would strip comments and the like so I could pack as much as possible in there. And, on another note, if you use this approach, your script is not protected and available in clear text. If this is a concern, you should be using .pjs files as well.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse