Results 1 to 4 of 4

Thread: Payloads

  1. #1
    Join Date
    May 2004
    Location
    France
    Posts
    250

    Question Payloads

    How to get the payload within a script action ?


    In a script, I use the
    gir.triggerEvent(eventString, eventDevice, keyMod,payloads)
    function.

    I set a value in Payloads


    In the other action script fired by this event, how to read the payloads value ?

    Thanks

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    I don't think that has been exposed yet. I will add that functionality for the next Girder release.
    Ron
    No support through PM

  3. #3
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    The variable "event" will be filled with event details. For example:

    Code:
    local payloads = {     "pop",
         "crackle"
     }
     gir.triggerEvent("Bang!", 500, Promixis.Event.MOD_ON, payloads)
    will create an event table with this content:




    Code:
    Fri Sep 27 11:30:20 2013    { -- #0
    Fri Sep 27 11:30:20 2013       ["device"] = 500,
    Fri Sep 27 11:30:20 2013       ["payloads"] = { -- #1
    Fri Sep 27 11:30:20 2013          [1] = "pop",
    Fri Sep 27 11:30:20 2013          [2] = "crackle",
    Fri Sep 27 11:30:20 2013       } -- #1,
    Fri Sep 27 11:30:20 2013       ["event"] = "Bang!",
    Fri Sep 27 11:30:20 2013       ["modifier"] = 0,
    Fri Sep 27 11:30:20 2013    } -- #0
    Girder 6.0.0.27
    Ron
    No support through PM

  4. #4
    Join Date
    May 2004
    Location
    France
    Posts
    250

    Default

    Works great
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •