• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Fire Event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fire Event

    Here's my scenario:

    App 1 launches App 2
    App 2 launches App 3
    App 3 fires an event so App 2 can fire an event and shut down
    App 1 has Listeners for App 2 and App 3 since it also launches App 3 under certain conditions..
    Both listeners are triggering which inadvertently shuts down App 1......

    I need to "unfire" the event for App 3 as part of the shut down of App 2.....Or be able to conditionally turn off the listener.

    How's that for a mouthful.......

    Any ideas???

    Thx

    Dan

  • #2
    Not sure I understand the sequence of events entirely but could you set a feature name against your "conditional" listener and set the feature on/off accordingly?

    Comment


    • #3
      that was my thought.....but that would mean a couple calls to button programs before and after the launch of App 2....any chance features can be enable/disabled from with NAB rather than on the backend? I'd prefer not to have the extra overhead....

      Comment


      • #4
        I will add a feature request to see if we can enable/disable features directly in behaviors. You could execute a script that can disable/enable features right now and below is the code example

        Code:
        /**
         * sync features takes two parameters
         *  - first parameter is an array of features you want to disable
         *  - second parameter is an array of features you want to enable
         */
        
        // disable the feature called 'callacme'
        //
        Valence.query.util.Helper.syncFeatures(['callacme'], []);
        
        // enable the feature called 'callacme'
        //
        Valence.query.util.Helper.syncFeatures([], ['callacme']);

        Comment


        • #5
          Hi.... i'm testing via a button call.... if it does the job i'll try the script....

          and thanx for adding to the list.....

          d

          Comment


          • #6
            just FYI.... for whatever reason, I couldn't get this to work correctly via an RPG call.... I saw no evidence in DevTools that a call was made..... But it worked like a charm via scripting so I'm good for the moment...

            Thx

            Comment


            • #7
              Dan,

              In the next 6.1 update you will be able to turn on/off features directly from behaviors via app variables

              Thanks

              Comment

              Working...
              X