MobileApplication navigator error
Hi,
I try to use RL for my MobileApplication. The problem occurs when
I' am trying to push the view in main navigator stack .
All logic is packed in command. The error was that container is not
created , it is strange, because MobileApplication should to create
in the begining of the application. I tryied to create a new
instance of ViewNavigator and apply it to
MobileApplication.navigator, but after that when I tryied to push
the new view in navigator stack I receive error:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at spark.components::ViewNavigator/scheduleAction()[E:\dev\hero_private_beta\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1111]
This is the 1111 error line in ViewNavigator.as - explicitFrameRate = systemManager.stage.frameRate;
If I try to push view without using RL, all is ok. navigator var
in MobileApplication is not empty and pushView executes
normally.
In attached file you can see my command.
Maybe becuase navigator is optimezed in some way from Adobe , and
also because RL is optimized to destroy not used components,
somewhere they are missed instance.
Any kind of info will be well done. If there is a some sample on
mobile application created with RL?
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
1 Posted by dimitarmar on 17 Feb, 2011 09:17 AM
I found some additional conditions.
If I replace:
mainView.navigator.pushView(event.viewClass, event.data, event.transition);
with
FlexGlobals.topLevelApplication.navigator.pushView(event.viewClass, event.data, event.transition);
it's working mainView is injected in my command and also declared in context file
injector.mapSingletonOf(Gallery1,Gallery1);
Why it cannot be executed when I using injected mainVIew?
2 Posted by dimitarmar on 17 Feb, 2011 09:37 AM
So finally maybe the correct question is. How to inject main application mxml (FlexGlobals.topLevelApplication) ?
3 Posted by Max on 09 Aug, 2011 10:05 PM
Off the top of my head, you could try setting up the following in your context:
and then injecting the ViewNavigator into a NavigationModel you create to handle that.
Ondina D.F. closed this discussion on 03 Nov, 2011 05:38 PM.