Hi guys!
First, I'd like to express my thankfullness for this page! It already helped me really much, but now I have a problem that I can't solve on my own:
I'm currently learning how to do fancy things with ProntoScript on my Pronto 9400. :-) Because it is my first Pronto, I began my project in PEP2. (Well I tried PEP1.1 a bit, but the ProntoScript supporting Simulator of PEP2 convinced me of the latest PEP version.)
Most of the things are working pretty well and my first ProntoScript component (a PS generated radio station list with scroll wheel support) is running. :-)
Now, I'd like to use some kind of "Shared ProntoScript Library", i.e. I would like to put all PS code there, that will be invoked from multiple locations/activities.
Example:
I'd like to create a shared macro "Switch to Source X" that checks the global variables (containing the power states and input settings of all devices) and executes all appropriate actions.
I've already read many forum threads here, and I thought that it should work this way in PEP2:
- I've created an activity named "aLib" with a page "pPage" and a button "wButton"
- I attached the PS Code 'System.print("Hello World!");' to the button
- If I press this button manually, the Simulator dumps the "Hello World" string, as expected
- Now I thought that I could call the PS code of this button by calling 'CF.widget("wButton", "pPage", "aLib").executeActions()' in another activity
I've tried this PS call ('CF.widget...') in an page PS code and in a button PS code, but the Simulator does not tell me anything (not even an error message).
Do you have any ideas why this does not work?
Thanks a lot and have a happy new year 2009!
Last edited by flattermann
on December 30, 2008 06:08.