Your Universal Remote Control Center
Philips Pronto Professional Forum - View Post
Previous section Next section Previous page Next page Up level
Up level
The following page was printed from


Page 2 of 2
Is there a free ProntoScript dialog box implementation?
This thread has 16 replies. Displaying posts 16 through 17.
Post 16 made on Tuesday June 4, 2019 at 18:16
Lyndel McGee
RC Moderator
August 2001
The issue is that the Page.onExit call's 'this' is the global scope and it cannot resolve the function named 'close'. The following code should tell you if you have this problem. = function() {
try {
close(); }
catch(e) {
System.print('error e:' + e);

should illustrate the problem. The only solution to this is to put a reference to the scope containing close into the page at the same time as you set the onExit().

With regard to 'null'ing out the, consider the following.
You PageUp to exit the page and your close() code is called. Even though you have moved to a different page, the JavaScript for the page you just left is still available as the page is still in the Prontoscript 'activity' scope as you have not exited the activity. Therefore, when you come back into it via PageDown, etc, the previous onExit call to 'close()' is still there even though you may not have shown a dialog.

Think of it as similar to this scenario. You put a post-it note on the fridge, you do the task on the note, but then you don't remove the note after completion.
You leave the house and then your spouse comes home, and then sees the note, and does the task a 2nd time. Which in certain cases may cause damage, especially if the task on the note states "Strip, sand, stain, and refinish the hardwood floor in the kitchen".
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 17 made on Wednesday June 5, 2019 at 06:33
Long Time Member
September 2003
Thanks a lot, that was very enlightening ;)
I'm unable to catch the exception output in the simulator - I'd probably need the serial debug port for that.
Anyway, your explanation sounds plausible and I modified the onExit callback function accordingly.

Regarding the "null"-ing -  I had thought that those callbacks would be cleared by the system when changing pages - just like everything else is cleared when changing activities.
Apparently that assumption was wrong - I just verified it checking for the page's .onExit value from another page when not "null"-ing it.
That's good to know!
I hope for your kitchen floor (and your spouse, of course) that your Post-it note management is just as thorough... :D

Page 2 of 2

Jump to

Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse