or Create a profile
19 Nov, 2010 11:16 AM
Thank you for reading this. We are using Robotlegs 1.1 with Joel Hooks modular utility to build an application and have spotted a bug.
When browser is resized manually, this seems to completely break the mapping of Commands to Events inside a loded module Context. Modules load into a TabNavigator, so re-loading the broken module re-maps everything when Context.startup() is run again. However re-sizing browser again inevitably leads to the same failure.
Has anybody come across this strange behaviour?
2 Posted by Stray on 19 Nov, 2010 12:49 PM
Hi Igor - could you post the code that is breaking (ie your context mapping) - obviously with any sensitive stuff stripped out.
Even better - if you can create a minimal version that demonstrates the breakage, we can take a closer look.
The absolute best - if you can do it - would be a test added to the test suite that currently fails and should pass once the bug is fixed.
3 Posted by Igor Volk on 19 Nov, 2010 01:31 PM
I have just found the reason for this fault. It is nothing to do with RL. Inside each module I had a cleanup() method ModuleMediator unmapping all events, commands, singletons etc when the module is removed. It was previously added to
weirdly this was firing when the application was being resized as part of the browser window. It didn't even occur to me to check for it first.
Now I have changed the above line to:
viewComponent.parent.addEventListener("unload", cleanup, false, 0, true);
parent in this case is ModuleLoader and it all works fine.
Thank you so much for looking into it.
4 Posted by Stray on 19 Nov, 2010 02:05 PM
Great - glad you found it, and good to have it in the knowledge base for people who have this problem in future.
Stray closed this discussion
on 11 Feb, 2011 05:21 PM.
Comments are currently closed for this discussion.
You can start a new one.
2 people watching.
No more actions from Robotlegs or the discussion starter are required.
This discussion is private.
Only you and Robotlegs support staff can see and reply to it.
This discussion is public. Everyone can see and reply to it.
Powered by Tender™.