Picture of Daryl Hedley
Re: Extensions load order
by Daryl Hedley - Wednesday, 21 May 2014, 12:28 PM
 

Hey Gavin,

Thanks for the detailed response. If you know that these two extensions are going to work together then I would have the navigation extension trigger an event once it's rendered. I would suggest using a _.defer() to make sure the render loop has finished.

postRender: function() {

    _.defer(function() {
        Adapt.trigger('navExtension:postRender');
    });

}

 

Then in your audio extension - listen to this event:

Adapt.on('navExtension:postRender', function() {
    new AudioExtensionView();
});

I'm not sure what you've named them but just be careful about triggering events with 'navigation' as this is what the navigation triggers.

Hope this helps and let me know if you need anything else.

Thanks,

Daryl