How to access "HelloFlashApp" in AppConfig ?

vishwas.gagrani's Avatar

vishwas.gagrani

25 Feb, 2013 07:34 AM

Reference : https://github.com/darscan/robotlegs-demos-HelloFlash/tree/master/s...

     public class HelloFlashApp extends Sprite
    {

        private var _context:IContext;

        public function HelloFlashApp()
        {
            _context = new Context()
                .install(MVCSBundle)
                .configure(AppConfig)
                .configure(new ContextView(this));
        }
    }

I am having doubts regarding ContextView. What is it exactly. I search docs and it says : The Context View represents the root DisplayObjectContainer for a Context ?

So, it should represent the "HelloFlashApp" ? ( Or the parent of HelloFlashApp ? )

Additionally, how can i access "HelloFlashApp" in AppConfig.as ?
by using the injected contextView ?
if yes, does that mean i can access contextView ( HelloFlashApp ) anywhere in "Model" or even in any "Mediators" . Would not that open up direct access of one view with another ?

  1. Support Staff 1 Posted by creynders on 25 Feb, 2013 08:33 AM

    creynders's Avatar

    Yes, it holds a reference to HelloFlashApp.

    Obviously this could be misused. There's always a trade-off between flexibility and security and this is one of those.

  2. 2 Posted by vishwas.gagrani on 27 Feb, 2013 07:46 PM

    vishwas.gagrani's Avatar

    ok, ya. contextView.view is same as HelloFlashApp instance.

  3. Support Staff 3 Posted by Shaun Smith on 27 Feb, 2013 10:16 PM

    Shaun Smith's Avatar

    Hi. I'm closing this thread for now. Please feel free to re-open it if you are still experiencing issues.

  4. Shaun Smith closed this discussion on 27 Feb, 2013 10:16 PM.

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