SWC uses RL 1.5.2 and flex application is using a new context with SWC

ran's Avatar

ran

26 Jul, 2012 02:19 AM

Maybe a simple question;
How do I Inject a SWC's view into the flex application mediator using RL 1.5.2, when the SWC already has a context? Do I recreate all the SWCs RL context mappings into the flex application context;

  1. Support Staff 1 Posted by Ondina D.F. on 27 Jul, 2012 11:15 AM

    Ondina D.F.'s Avatar

    Hi ran,

    Maybe a simple question; How do I Inject a SWC's view into the flex application mediator using RL 1.5.2, when the SWC already has a context? Do I recreate all the SWCs RL context mappings into the flex application context;

    Maybe it's just me, but I don't understand your simple question ;)
    Hopefully, others will have answers for you; I just have a few questions:

    First of all, why do you want to inject the external swc into your FlexApplicationMediator, which, normally, means the Mediator for the root display object (Application, WindowedApplication…)?

    If your FlexApplication (your main application) has its own context, it means you’re using it (the Flex Application – root display object) or one of its subcomponents as a contextView.
    If you want to have a mediator for the external SWC, you’d have to load it somewhere and have a mapping in the main context for it, but I’m not sure what you’d want the mediator to do actually.

    Do you really want to have 2 separate contexts, or do you want to use the SWC as a library, using some of its components in your main Flex Application, mediating them and so on, using a shared context?

    Or if you want to have 2 separate contexts, is your intention to use the loaded swc as a module, and your question is how to communicate between shell and modules? If so, there are several discussions about “modular”, “modules”, “communicate between contexts” on this forum and under the example section there are also some demos ( Joel’s demo and tutorial as a start). If you don’t find them, I can give you the links.

    Give us more details:)
    After clarifying your use case and purpose, we could probably give you a more specific answer.

    Ondina

  2. 2 Posted by ran on 27 Jul, 2012 03:22 PM

    ran's Avatar

    No Problems, I figured it out just extend the SWC's context into the Flex applications context. The problem was that the library already had a context defined and whenever I would create the first object in the SWC it would create the SWC's context, so 2 separate contexts, I only wanted one.

    Thanks

  3. Support Staff 3 Posted by Ondina D.F. on 27 Jul, 2012 03:37 PM

    Ondina D.F.'s Avatar

    Glad you figured it out:)

  4. Ondina D.F. closed this discussion on 27 Jul, 2012 03:37 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