For your specific example, you can have a property called dataProvider
in banner module which you the assign to the ToggleButtonBar.

 <!-- banner module -->
 <Module>
   <Object id="dataProvider" />
   <ToggleButtonBar dataProvider="{dataProvider}" ... />
 </Module>

 <!-- main app -->
 <App>
   <Module id="banner" dataProvider="{viewStack}" />
   <ViewStack id="viewStack" ... />
 </App>

And so on.

In general, you can communicate between modules and applications using
properties and events.

On 4/25/07, rodneyjlucas <[EMAIL PROTECTED]> wrote:
>
> I am new to modules but think the idea is great.  However, I am trying
> to modularize a prototype and get stuck.  I would like to have a
> simple framework Application with modular components for each major
> piece of the application (banner, footer, left hand navigation, main
> content..etc).
>
> The problem occurs when I have a need for module to module or module
> to Application communication.  For example if I have a
> mx:ToggleButtonBar in the banner module.  When a change event is fired
> I want the viewstack to change the child it is showing and to handle
> loading/unload other modules.
>
> What is the best way to handle this?  Bubble events somehow?  Pass the
> banner/togglebuttonbar a handle to the application's viewstack?  Other
> ideas.  Obviously part of the trick is to keep things loosely coupled
> and reusable.
>
> Rodney
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>

Reply via email to