New script if you want to have multiple things happen on the same event.

New script if you want to have multiple things happen on the same event. Does require some scripting knowlegde to use though. If there are any bugs please let me know, but it should work fairly well. If you have any suggestions on how to improve this let me know too! Import it here: http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_event_bus

http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_event_bus
]]>

5 Commentsto New script if you want to have multiple things happen on the same event.

  1. Anonymous says:

    < ![CDATA[

    Nice idea!



    My tips to improve:


    1. You declare all variables global, so they may interfere with other scripts. (especially names like script or event are used often)


    -> declare with “var”


    2. Instead of using runscript as interface, you could set a script in every load event, which defines functions like subscribe and unsubscribe.


    3. If you use semicolons to end your lines the code is easier to read and won’t break when format is lost. (E.g. when copy/pasting from some browsers)

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Thanks for your tips. I actually kinda forgot to polish code before uploading. There was still some debugging code in there and indeed all the “var”‘s and semicolons were missing. I’ll add them in a minute.


    What do you mean with “every load”? There is only one load event for each object right?

    ]]>

  3. Anonymous says:

    < ![CDATA[

    The polishing is finally done. Fixed some bugs meanwhile too!

    ]]>

  4. Anonymous says:

    < ![CDATA[

    The getOb function isn’t using the passed parameter. Maybe use two return statements instead of ob variable?

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Oops little derp. It’s fixed now.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *