Mediator register not called with Robotlegs + GAIA
Hello,
I have an empty robotlegs + gaia setup project.
However, I can't seem to figger out what I forgot to configure in my project? Everything seems to be running/compiling fine. Only the onRegister functions in the mediators are never being called. What did I forget?
- gaia-as3-project-setup.zip 918 KB
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Stray on 08 Jul, 2011 08:54 AM
Hi Rive,
This is nearly always due to race conditions.
If you add traces to the execute of your command that maps the mediators, you'll be able to see whether the mapping is being made after your 'Home Page' trace and so on.
I suspect that it is but I haven't run the project - I've only had a little look through as I'm not familiar enough with Gaia really - Jesse Warden / @jesterxl on twitter has used the two together so if you don't fix it by this afternoon, you could ask him (he's in the US).
I think you probably need to delay Gaia's start-up until the mappings have been made.
hth,
Stray
2 Posted by Rive on 08 Jul, 2011 10:12 AM
Thanks Stray,
I got that far too, my views are added after I map my mediators...it should be the other way around. As explained here:
https://github.com/robotlegs/robotlegs-framework/wiki/Common-Proble...
But I can't see what the best place/order would be to fix this.
I guess I'll ask Jesse on twitter. I hope he's willing to help me out here. Its strange because I did follow his articles.
3 Posted by Rive on 11 Jul, 2011 07:18 AM
I do not seem to get any response from Jesse Warden.
If there's anyone who knows why views/pages get added in the Gaia framework before I registered my mediators with Robotlegs... I would be very helpful. Because I can't figger out how to setup the right order.
4 Posted by Rive on 11 Jul, 2011 09:58 AM
Found the solution!
Check my repository:
https://github.com/rivebe/library/tree/master/actionscript3/gaia-ro...
Ondina D.F. closed this discussion on 01 Nov, 2011 04:12 PM.