MobileApplication navigator error

dimitarmar's Avatar


17 Feb, 2011 08:40 AM

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\]

This is the 1111 error line in - 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?

  1. 1 Posted by dimitarmar on 17 Feb, 2011 09:17 AM

    dimitarmar's Avatar

    I found some additional conditions.
    If I replace:
    mainView.navigator.pushView(event.viewClass,, event.transition);
    FlexGlobals.topLevelApplication.navigator.pushView(event.viewClass,, event.transition);

    it's working mainView is injected in my command and also declared in context file

    Why it cannot be executed when I using injected mainVIew?

  2. 2 Posted by dimitarmar on 17 Feb, 2011 09:37 AM

    dimitarmar's Avatar

    So finally maybe the correct question is. How to inject main application mxml (FlexGlobals.topLevelApplication) ?

  3. 3 Posted by Max on 09 Aug, 2011 10:05 PM

    Max's Avatar

    Off the top of my head, you could try setting up the following in your context:

    injector.mapValue(ViewNavigator, FlexGlobals.topLevelApplication.navigator);

    and then injecting the ViewNavigator into a NavigationModel you create to handle that.

  4. Ondina D.F. closed this discussion on 03 Nov, 2011 05:38 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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