Firing 2 Global Events

Firing 2 Global Events

Postby RRattlidge » Fri Nov 13, 2009 9:30 am

Hi,

There seems to be an issue when trying to fire 2 global events from the same trigger. For example, we're navigating we're using both tabs and navigation buttons.

On Page load, we're setting a global variable to specify the tab, then firing a globalevent to trigger the hiding/showing of the appropriate tab.

Also, depending on the way the page is set up, we may need to disable the next arrow until the learner has reached the relevant stage of the page.

So, here's what we have :

Trigger : Page Controller - onPageLoad
Responses : Page Controller - fireGlobalEvent - disablenext (this is caught by the master page and disables the next arrow)
TabNo - setValue - 2
Page Controller - fireGlobalEvent - tabchange (this is also caught by the master and shows / hides tabs according to value set above).

This issue that only one of the above seems to work, depending on which order I put them in.

Is the solution as simple as separating them, or is there something else I need to be aware of when using fireGlobalEvent?

Thanks in advance, as always. Apologies for firing so many questions at you lately...

rich
Last edited by RRattlidge on Mon Nov 16, 2009 2:29 am, edited 1 time in total.
RRattlidge
 
Posts: 34
Joined: Thu Jul 19, 2007 9:01 am

Re: Firing 2 Global Events

Postby Nav » Fri Nov 13, 2009 6:32 pm

Hi Richard,
Currently there is no way to send 2 global events at once. I can't remember if it's only the first one or the second one that goes through. But that's the way it works since a global event is caught later after that action and any other actions with the same trigger on that page are done firing.

We usually set up individual global events that overlap certain functionality, but that really isn't the best method. The only workaround that I can think of at the moment is to use a 1 second timer and split these into two actions.

Trigger : Page Controller - onPageLoad
Response: Page Controller - fireGlobalEvent - disablenext (this is caught by the master page and disables the next arrow)
Response: TabNo - setValue - 2
Response: Timer 1 > continue

Trigger: Timer 1 > onTimeZero
Response: Page Controller - fireGlobalEvent - tabchange (this is also caught by the master and shows / hides tabs according to value set above).

I know this is a workaround, and I'll see if anything can be done about it, or if there's a better workaround.
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Firing 2 Global Events

Postby RRattlidge » Mon Nov 16, 2009 3:11 am

Thanks Nav, that's useful.

I think that rather than use the timer idea, I will set up another global event that triggers all the events that the other two would have triggered. I think it's the simplest solution for now given that it would only require one more global event with our current set up. Let me know if you envisage any problems doing it like this.

I'd be interested if your guys come up with any other solutions.

Many thanks again,

rich.
RRattlidge
 
Posts: 34
Joined: Thu Jul 19, 2007 9:01 am

Re: Firing 2 Global Events

Postby Nav » Wed Nov 18, 2009 4:09 pm

Hi Rich,
That's actually the solution that we end up doing as well.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm


Return to Feedback & Enhancement Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Not able to open ./cache/data_global.php