Modules in TabNavigator

Hello,
I have TabNavicator container and a few modules inside:
          <mx:TabNavigator x="10" y="41" width="984" height="456">
               <mx:Canvas label="A" width="100%" height="100%">
                    <mx:ModuleLoader width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" url="modules/module1.swf" />
               </mx:Canvas>
               <mx:Canvas label="B" width="100%" height="100%">
                   <mx:ModuleLoader width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" url="modules/module2.swf" />
               </mx:Canvas>
               <mx:Canvas label="C" width="100%" height="100%">
                    <mx:ModuleLoader width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" url="modules/module3.swf" />
               </mx:Canvas>
               </mx:TabNavigator>
Each of these modules have same creationComplete event:
creationComplete="init()"
where they read database and update some views.
All I want it to make this init() function to execute everytime I select proper tab inside which I have some module.
For example when i click on "A" tab module1 will be displayed but it shuld also call init() then.
Unfortunately creationComplete is fired only once - when module is loaded for the first time ( or maybe it loaded one and only one - i don't know).
Do you know how to make it work?

Ok, so what do I have now:
1) an interface:
package modules
    import flash.events.IEventDispatcher;
    public interface IModuleInterface extends IEventDispatcher {
        function refresh():void;
2) main module that loads other modules in TabNavigator:
<mx:TabNavigator x="10" y="41" width="961" height="458"  id="tab">
     <mx:Canvas label="A" width="100%" height="100%">
     <custom:CustomModuleLoader  width="100%" height="100%" verticalAlign="top" horizontalAlign="left" url="modules/module1.swf" />
     </mx:Canvas>
     <mx:Canvas label="B" width="100%" height="100%">
          <custom:CustomModuleLoader width="100%" height="100%" verticalAlign="top" horizontalAlign="left" url="modules/module2.swf" />
     </mx:Canvas>
     <mx:Canvas label="C" width="100%" height="100%">
          <custom:CustomModuleLoader  width="100%" height="100%" verticalAlign="top" horizontalAlign="left" url="modules/module3.swf" />
     </mx:Canvas>
</mx:TabNavigator>
CustomModuleLoader:
<mx:ModuleLoader xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" creationComplete="init()">
  <mx:Script>
    <![CDATA[
    public function init():void {
        addEventListener("ready", onReady);
    public function onReady(event:Event):void {
        var ichild:* = this.child as IModuleInterface;
        ichild.refresh();
and modules that are loaded in main module:
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()" implements="modules.IModuleInterface">
     <mx:Script>
          <![CDATA[
                         public function refresh() : void
                             mx.controls.Alert.show('tasks refresh');
          ]]>
     </mx:Script>
</mx:Module>
And I still cant execute refresh() functions defined in modules. And I don't have ANY idea why.  Maybe it's because main module (in whch other mudules are loaded) is a module itself - not the main application...
Can you help me?

Similar Messages

  • Module loaded from TabNavigator tab displays blank screen

    I have an application which is using the TabNavigator to manage the active view content.  The tabs are backed by individual VBox's which contain the
    mx:ModuleLoader commands to load the module swf's.  The application runs and the appropriate tabs are displayed.
    When clicking on the various tabs, I know that the Ready ModuleEvent is getting fired and that the module projects default mxml class is being loaded and executed.  However, the view content of the module is never displayed in the browser.
    The following is a clip from the code block:
            <mx:TabNavigator id="mainMenuTabBar" width="100%" height="100%" creationPolicy="auto" tabStyleName="tab">
                <mx:VBox id="moduleOneTab" label="ModuleOne" creationPolicy="auto" width="100%" height="100%">
                    <mx:ModuleLoader id="testLoader" url="testModuleOne.swf"
                            preinitialize="testLoader.applicationDomain=ApplicationDomain.currentDomain" />           
                </mx:VBox>
                <mx:VBox id="moduleOneTab" label="ModuleOne" creationPolicy="auto" width="100%" height="100%">
                     <mx:ModuleLoader id="testLoader" url="testModuleOne.swf"                                    
                                 preinitialize="testLoader.applicationDomain=ApplicationDomain.currentDomain" />           
                 </mx:VBox>
           </mx:TabNavigator>
    Any suggestions would be greatly appreciated.
    Brian

    I have an application which is using the TabNavigator to manage the active view content.  The tabs are backed by individual VBox's which contain the
    mx:ModuleLoader commands to load the module swf's.  The application runs and the appropriate tabs are displayed.
    When clicking on the various tabs, I know that the Ready ModuleEvent is getting fired and that the module projects default mxml class is being loaded and executed.  However, the view content of the module is never displayed in the browser.
    The following is a clip from the code block:
            <mx:TabNavigator id="mainMenuTabBar" width="100%" height="100%" creationPolicy="auto" tabStyleName="tab">
                <mx:VBox id="moduleOneTab" label="ModuleOne" creationPolicy="auto" width="100%" height="100%">
                    <mx:ModuleLoader id="testLoader" url="testModuleOne.swf"
                            preinitialize="testLoader.applicationDomain=ApplicationDomain.currentDomain" />           
                </mx:VBox>
                <mx:VBox id="moduleOneTab" label="ModuleOne" creationPolicy="auto" width="100%" height="100%">
                     <mx:ModuleLoader id="testLoader" url="testModuleOne.swf"                                    
                                 preinitialize="testLoader.applicationDomain=ApplicationDomain.currentDomain" />           
                 </mx:VBox>
           </mx:TabNavigator>
    Any suggestions would be greatly appreciated.
    Brian

  • Reference Application TabNavigator from a Module

    I have a LinkButton in my module and when it is clicked I
    would like to change the selected tab of the TabNavigator that
    resides in my Application. When the LinkButton was right in my
    Application I simply added
    "click='tabNavName.selectedChild=tabName;'". I feel as though I
    need to prepend something to my click event to reference the
    application but I don't know what I need to add.

    you can always use Application.application prepend (it works
    like a charm , "little bit of "hackorama" way but if you are not
    doing reusable component that is fine).

  • Flex 4 - Error with DataGrid in Module

    Hey, I'm using Flex 4 final and am now getting the following error when loading a Module with a DataGrid inside:
    TypeError: Error #1009: Cannot access a property or method of a null object reference
        at mx.styles::StyleProtoChain$/initProtoChainForUIComponentStyleName()[E:\dev\4.0.0\framewor ks\projects\framework\src\mx\styles\StyleProtoChain.as:356]
    It is created via MXML:
    <mx:Module layout="absolute" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
        <mx:DataGrid>
            ... config etc.
        </mx:DataGrid>
        ... other code
    </mx:Module>
    If I remove the DataGrid the Module works fine. The code used to work in the various betas.
    If I put a DataGrid in the main application that also renders fine, so it's only inside Modules.
    Thanks in advance for any help or ideas!

    Hi Darrell,
         I have the exact same error, and yes I am using module.factory.create() but I get an error when I try to add the module to my stage.  Here it is the code in my modReady function.
    var _sd:Object = new Object();         
    _sd = util.app.SDModule.factory.create() as SequenceDetail;
                _sd.sequenceId = event.currentTarget.selectedItem.sequenceId;
                _sd.environment = event.currentTarget.selectedItem.environment;
                _sd.seqname = event.currentTarget.selectedItem.sequenceName;
                util.app.page.addChildAt(_sd as SequenceDetail, util.app.page.numChildren);
                util.app.nav_buttons.selectedIndex = -1;
                util.app.page.selectedIndex = util.app.page.numChildren-1;
    I get an error on util.app.page.addChildAt(........).
    error is
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at mx.styles::StyleProtoChain$/initProtoChainForUIComponentStyleName()[E:\dev\4.0.0\framewor ks\projects\framework\src\mx\styles\StyleProtoChain.as:356]
        at mx.styles::StyleProtoChain$/initProtoChain()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\styles\StyleProtoChain.as:171]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::initProtoChain()[E:\dev\4.0.0\frameworks\proje cts\framework\src\mx\core\UIComponent.as:10186]
        at mx.core::UIComponent/regenerateStyleCache()[E:\dev\4.0.0\frameworks\projects\framework\sr c\mx\core\UIComponent.as:10249]
        at mx.core::Container/regenerateStyleCache()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\Container.as:3737]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addingChild()[E:\dev\4.0.0\frameworks\projects \framework\src\mx\core\UIComponent.as:7114]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChild()[E:\dev\4.0.0\frameworks \projects\framework\src\mx\core\Container.as:4464]
        at mx.core::ContainerRawChildrenList/addChild()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\core\ContainerRawChildrenList.as:143]
        at mx.containers::TabNavigator/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\containers\TabNavigator.as:559]
        at mx.core::UIComponent/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\ UIComponent.as:7250]
        at mx.core::Container/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:3129]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\UIComponent.as:7142]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\Container.as:3951]
        at mx.core::Container/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:2616]
        at mx.core::Container/addChild()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Cont ainer.as:2534]
        at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\core\Container.as:4371]
        at mx.core::Container/createComponentsFromDescriptors()[E:\dev\4.0.0\frameworks\projects\fra mework\src\mx\core\Container.as:4160]
        at mx.containers::Panel/createComponentsFromDescriptors()[E:\dev\4.0.0\frameworks\projects\f ramework\src\mx\containers\Panel.as:1685]
        at mx.core::Container/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\Container.as:3187]
        at mx.containers::Panel/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\c ontainers\Panel.as:1198]
        at mx.core::UIComponent/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\ UIComponent.as:7250]
        at mx.core::Container/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:3129]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\UIComponent.as:7142]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\Container.as:3951]
        at mx.core::Container/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:2616]
        at mx.core::Container/addChild()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Cont ainer.as:2534]
        at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\core\Container.as:4371]
        at mx.core::Container/createComponentsFromDescriptors()[E:\dev\4.0.0\frameworks\projects\fra mework\src\mx\core\Container.as:4160]
        at mx.core::Container/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\Container.as:3187]
        at mx.core::UIComponent/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\ UIComponent.as:7250]
        at mx.core::Container/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:3129]
        at SequenceDetail/initialize()
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\UIComponent.as:7142]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\Container.as:3951]
        at mx.core::Container/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:2616]
        at mx.containers::ViewStack/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\c ontainers\ViewStack.as:1426]
        at com::MyDBResult/displaySequenceDetail()[/Users/jbhavsar/Documents/workspace/virome/src/co m/MyDBResult.as:114]
        at <anonymous>()[/Users/jbhavsar/Documents/workspace/virome/src/com/MyDBResult.as:103]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at ModuleInfoProxy/moduleEventHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\mo dules\ModuleManager.as:1168]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at ModuleInfo/readyHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\modules\Modul eManager.as:812]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::FlexModuleFactory/update()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\FlexModuleFactory.as:433]
        at mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\core\FlexModuleFactory.as:582]
        at mx.core::FlexModuleFactory/docFrameListener()[E:\dev\4.0.0\frameworks\projects\framework\ src\mx\core\FlexModuleFactory.as:126]
    Thanks
    Jay
    p.s: Please dont hammer me if my code isn't upto standard, I am learning this as I go along.

  • Tabnavigator with swfloader problem

    Hello,
    I'm trying to run a tabnavigator component with each tab having a separate swfloader.  Each swfloader is a different datagrid that I populate with the SystemManager.application['functionName'] = 'parameters' method.
    My problem is that when I a few tabs, only the very last tab's datagrid will have data, and the others will be blank.  What's wrong with it?
                public var matrixLoader:SWFLoader;
                public function addTab(tabName:String, swfURL:String, setFunc:Array, searchString:Array):void {
                    var tabCanvas:Canvas = new Canvas();
                    tabCanvas.label = tabName;
                    tabCanvas.id = tabCanvas.label;
                    tabCanvas.horizontalScrollPolicy = "off";
                    tabCanvas.verticalScrollPolicy = "off";
                    functionName = new Array(setFunc);
                    paramString = new Array(searchString);
                    matrixLoader = new SWFLoader();
                    matrixLoader.minHeight = 100;
                    matrixLoader.minWidth = 100;
                    matrixLoader.percentWidth = 100;
                    matrixLoader.percentHeight = 100;
                    matrixLoader.addEventListener(FlexEvent.UPDATE_COMPLETE, created);
                    matrixLoader.load(swfURL);
                    tabCanvas.addChild(matrixLoader);
                    tabnavi.addChildAt(tabCanvas,tabnavi.numChildren);
                public var loadedSM:SystemManager;
                private function created(event:FlexEvent):void {
                    loadedSM = new SystemManager();
                    if (matrixLoader.content != null) {
                        loadedSM = SystemManager(matrixLoader.content);
                        if (loadedSM.application != null) {
                            for(var i:int = 0; i < functionName.length; i++){
                                loadedSM.application[functionName[i].toString()] = paramString[i].toString();
    Any help would be greatly appreciated.

    Hopefully before you maybe loaded the subapp via
        swfLoader1.source="subapp.swf?foo=1
        swfLoader2.source="subapp.swf?foo=2
    And code somewhere in the Application checked parameters.foo and set foo
    appropriately:
        <mx:Application initialize="checkFoo()"...
        <mx:Script>
            public var foo:int;
            private function checkFoo():void
                foo = parameters.foo;
    Now you just load the module once w/o parameters
        private var modInfo:IModuleInfo = ModuleManager.getModule("module.swf");
    And once the module is ready:
        var module1:IMyModuleInterface = modInfo.factory.create();
        module1.foo = 1;
    And
        var module2:IMyModuleInterface = modInfo.factory.create();
        module2.foo = 2;

  • Access States in Modules

    Hello, I am having trouble accessing states in a module.
    Knowing that my application would grow, I have started to modularise right away. For a simpel case, let us take the example from this website:
    http://evontech.com/forum-need-help/topic/875.html
    We have the Main.mxml and two mxml files (MainView and LoginView).
    Main.mxml:
    <?xml version="1.
    0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:view="view.*">
      <mx:TabNavigator>
          <view:LoginView />
          <view:MainView />
      </mx:TabNavigator>
    </mx:Application>
    Now, assume that have a state named StateB in MainView, and a button in LoginView. When I click on the button in LoginView, I was StateB in Mainview to open. How do I do that?
    This is the snippet from LoginView:
    protected function addBtn_clickHandler(event:MouseEvent):void
    currentState = "StateB";
    Thank you very much.

    Hello, I am having trouble accessing states in a module.
    Knowing that my application would grow, I have started to modularise right away. For a simpel case, let us take the example from this website:
    http://evontech.com/forum-need-help/topic/875.html
    We have the Main.mxml and two mxml files (MainView and LoginView).
    Main.mxml:
    <?xml version="1.
    0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:view="view.*">
      <mx:TabNavigator>
          <view:LoginView />
          <view:MainView />
      </mx:TabNavigator>
    </mx:Application>
    Now, assume that have a state named StateB in MainView, and a button in LoginView. When I click on the button in LoginView, I was StateB in Mainview to open. How do I do that?
    This is the snippet from LoginView:
    protected function addBtn_clickHandler(event:MouseEvent):void
    currentState = "StateB";
    Thank you very much.

  • Unable to load module

    Hey guys,
       I have an app with two modules within, both optimized for the app and are combined along with the app.  One module (Method) works fine, but my second module gives me an error.
         param 2 incompatible
       virt Object mx.core::FlexModuleFactory/callInContext()
       over * _SequenceDetail_mx_core_FlexModuleFactory/callInContext()
    VerifyError: Error #1053: Illegal override of _SequenceDetail_mx_core_FlexModuleFactory in _SequenceDetail_mx_core_FlexModuleFactory.
        at global$init()
    Some googling suggested that this module (SequenceDetail) should be compiled with the same SDK as my app.  They are comipled everytime I debug and app so that issue should be eliminated.
    It was running fine when app was compiled with FB Beta 1 and 2.  But it isn't working now.  Any ideas?  I don't have any other output in my console regarding this.
    Thanks
    Jay

    I have posted about this issue long time ago:
    http://forums.adobe.com/message/28925#28925
    this is the as file I had to link into main application :
    http://github.com/levancho/flex-shell/blob/master/fs-demo/web/flex/src/linker.as
    otherwise one of the modules, styles were completely gone for all of its those components,TabNavigation, ComboBox, etc ..
    this module has  a view inside, that is not part of display list, its just part of variable. that view has those components in it,.
    after module is loaded that view is addedto display List,but styles are gone.
    I have an application that demonstrates it, i cant say its  a simple app but I will try to simplify it, later on.
    this afternoon I will remove that linker and build a demo without it you will see the problem.
    Regards

  • Loading Multiple Instances Of A Module

    I am creating an applciation that will control golf simulators from a central location. The application will display information panels about each simulator in a tile component. The panels are modules. The below code tries to load 6 info panels if your press the button. When you press it, only 1 panel appears. If you press it a second time, 6 more appear. Does anyone have any insight as to why this occurs?
    Main App:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo">
        <fx:Script>
            <![CDATA[
                import mx.core.Application;
                import mx.managers.PopUpManager;
                import mx.events.ListEvent;
                import mx.events.FlexEvent;
                import mx.controls.Alert;
                import mx.modules.ModuleManager;
                import mx.modules.IModuleInfo;
                import mx.controls.ProgressBar;
                import flash.events.TimerEvent;
                import flash.utils.Timer;
                import mx.events.ModuleEvent;
                public var info:IModuleInfo;
                public var mySimCount:int = 6;
                protected function button5_clickHandler(event:MouseEvent):void
                    testPanels();
                 public function testPanels():void
                    var i:int;
                    for (i = 0; i < mySimCount; i++)
                        info = ModuleManager.getModule("simPanel.swf");
                        info.addEventListener(ModuleEvent.READY, modEventHandler);          
                        // Load the module into memory. Calling load() makes the
                        // IFlexModuleFactory available. You can then get an
                        // instance of the class using the factory's create()
                        // method.
                        info.load();
                private function modEventHandler(e:ModuleEvent):void {
                    // Add an instance of the module's class to the
                    // display list.
                    myTile.addChild(info.factory.create() as DisplayObject);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:Button  x="562" y="20" label="Button" click="button5_clickHandler(event)"/>
        <mx:Tile x="10" y="66" width="100%" height="100%" id="myTile">
        </mx:Tile>
    </s:Application>
    Module:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/halo" layout="absolute" width="250" height="350">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:Panel x="0" y="0" width="250" height="346" dropShadowVisible="false">
            <s:Label y="-21" text="Sim Name" left="10"/>
            <s:Label y="-21" text="Sim Status" right="6"/>
            <mx:TabNavigator x="10" y="10" width="228" height="252">
                <s:NavigatorContent label="View Stats" width="100%" height="100%">
                    <s:Label y="10" text="Course and Hole" left="10"/>
                    <mx:DataGrid x="10" y="24" height="190" width="206">
                        <mx:columns>
                            <mx:DataGridColumn headerText="Plyr" dataField="col1"/>
                            <mx:DataGridColumn headerText="Scr" dataField="col2" resizable="false"/>
                        </mx:columns>
                    </mx:DataGrid>
                </s:NavigatorContent>
                <s:NavigatorContent label="View Screen" width="100%" height="100%">
                </s:NavigatorContent>
            </mx:TabNavigator>
            <s:Label y="270" text="Time Information" x="84"/>
            <s:Label y="290" text="Alerts" height="18" x="109"/>
        </s:Panel>
    </mx:Module>

    Try something more like this:
              public function testPanels(event:Event = null):void
                    info = ModuleManager.getModule("simPanel.swf");
                    if (!info.ready)
                        info.addEventListener(ModuleEvent.READY, testPanels);                                            
                        // Load the module into memory. Calling load() makes the
                        // IFlexModuleFactory available. You can then get an
                        // instance of the class using the factory's create()
                        // method.
                        info.load();
                        return;
                    var i:int;
                    for (i = 0; i < mySimCount; i++)
                        myTile.addChild(info.factory.create() as DisplayObject);                   
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Flex module sometimes is blank.

    Hi guys,
    My application consistens two parts : client side and server side. Client side is created using flex . Client side includes several modules under different tabs.When first access the client by browser, the module will load data from server backend.
    I met such problems that the module sometimes be blank. There's nothing in the tab.I moniter the http request and response when blank tab is met . There's data in http request content  and the data is same with  content of http response when tab is correct.
    I have already be troubled with this for several days and could some one give some  advice about what problem maybe? Flex sdk3.2 is used.
    Thanks very much.
    Ivan.

    Thanks for the suggestion. I add flexspy button in the first tab. And I moniter the property value tree when empty tab is met. All is same with the value when no errors happen. But I notice one thing:
    1. only one canvas in the tab navigator visible=true at one time. i.e. currently A is the initial page, and you changed canvas b's visible property to true using FlexSPY , the display object of canva B will be overlapped with canvas A's object.  This is the regular scenario, For the empty tab case, nothing change when you do above action..
    So I am thinking whether there exist such a scenario:
    as you know, when switching between tabs, the current canvas' visible property will change from false to true. And does there exist sometimes, only the visible property value changed , the display object isn't changed to display?
    The action happened during first lanuching is :
    1. get a list of tabs
    2. create canvas based on above list and add to tabnavigator
    3. then initial from the first canvas to last.
    My application will create most UI component at the launch time

  • TabNavigator rendering...

    >
    > Using a simple two tab TabNavigator, two modules are loaded via
    ModuleManager.load, one in each tab.  A bitmap is being generated for each tab as a preview to
    what content exists on each tab.
    >
    > The first visible tab displays the bitmap normally. The second tab (not yet
    clicked on or shown) bitmap comes up empty as it would appear as if it hasn't
    rendered yet.
    >
    > The creationPolicy for all the associated containers is set to "all".
    >
    > Clicking on the second tab instantly shows the content as expected.
    >
    > Is there a manual method to forcing the second tab to render itself so that
    the preview bitmap can be generated without having to click on the second tab?
    >
    >

    You have to get that from the specific broadcast station.  They all have their own.  The thing I love about industry standards, is that there's so many of them.

  • Loading a new child container within TabNavigator

    Hi all,
    I use the TabNavigator in Flex 3 to navigate trough
    individual modules.
    Now, what I need is a hint on how to load a new module within
    a selected selected child from the TabNavigator (hope this makes
    sense!)
    The attached code shows that an individual module is loaded
    in the second tab.
    That module should change to another module (but still inside
    the second tab).
    Any ideas on how to accomplish that? The neccesary code
    should be handled from the first loaded module in the second tab
    ("MyChallenges").
    Please let me know if anything above does not make sense
    :)

    So you want to execute the load of module 2 from module 1?
    You could dispatch a custom event, with the handler unloading
    module 1 and loading module 2. The handler would be in the main app
    <Script> block.

  • Module load feedback

    Hello,
    I'm using modules to load others swf inside a tabnavigator in
    my main application.
    But.. when i select an item in the menu the application runs
    the ModuleLoader for a new TabBar and the new swf starts
    downloading.
    I need to put a feedback for the user inside this TabBar,
    like the initial DownloadProgressBar that my applications shows
    when it runs first time.
    In modules i dont have the property "preloader" or
    "usePreloader" to give this feedback for the user.
    Anyone know a solution?
    Thanks,
    Andrlop.

    look at the progress and ready events of ModuleLoader and you
    can use a progress bar in conjuction with these events to show user
    progress of module load.
    ATTA

  • Module + Tab Navigator = Error

    Everything works FINE until I load a new module. (Even after
    I go back to the original module, I get the error). Any component
    with a Tab Container or Accordian throws the following error when I
    load the component:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at mx.managers::HistoryManager$/register()
    at mx.containers::ViewStack/::addedHandler()
    at flash.display::DisplayObjectContainer/addChildAt()
    at mx.core::UIComponent/
    http://www.adobe.com/2006/flex/mx/internal::$addChildAt()
    at mx.core::Container/addChildAt()
    at mx.core::Container/addChild()
    at mx.core::Container/createComponentFromDescriptor()
    at mx.core::Container/createComponentsFromDescriptors()
    at mx.core::Container/mx.core:Container::createChildren()
    at mx.core::UIComponent/initialize()
    I have turned off History manager in the compiler page of the
    project properties. That does not help any.
    Any suggestions?
    Thanks
    Bruce

    Hi Bill,
    > Found a problem when submitting a textinput field from a
    canvas on a
    > TabNavigator. Problem only occurs when you do not go to
    the tab when viewing
    > on screen before submitting the TextInput.text
    >
    > This is the error.
    > TypeError: Error #1009: Cannot access a property or
    method of a null object
    > reference.
    >
    > If you click on the tab, view the contents of whatever
    and then submit, there
    > is no error. If you do NOT click on the tab, then the
    error occurs. Seems
    > like it does not create the tab until you view it. Which
    would not seem
    > correct. Think of the case of entry screens where you
    have 3 or 4 or more tab
    > sections on the screen.
    Try setting creationPolicy="all" on the TabNavigator. By
    default,
    creationPolicy is set to "auto", which means the TabNavigator
    only
    creates the children of the initially visible pane on
    startup--this is
    to make startup faster. In your case, since you need to
    access children
    of the hidden tabs regardless of whether the user visits
    them, you
    should use creationPolicy="all".
    nj
    Flex Builder team

  • Mixing memory modules on Westmere

    Dear Hardware gurus,
    I have a 12-Cores Westmere. Do you know is it possible to mix different memory modules on it, namely:
    6x1 Gb 1330Mhz
    +
    2x4 Gb 1066Mhz
    and if yes, in which configuration?
    Thanks a lot for any comment!

    Kappy, thanks for the note.
    I am actually going to order some more 1333 modules, but just for the short time I have to work with what I have currently (see my original post).
    As I posted above, I tried a bit already to combine the modules and Mac doesn't boot
    Can you suggest a configuration, which will work?

  • Adobe Bridge CS6 for mac: export modules, facebook export module gives an error every time i try to sign in

    in the export module for facebook every time i click "sign in to facebook" it gives the following error: "An error occurred while request facebook connection"

    "An error occurred while request facebook connection"
    The export module has been discontinued in Bridge CC and as long as it has been there the option for social media has worked only for FB in a few countries. Due to rights management (as we where told) there where restrictions for most other countries. But if it did work for you in the past you should try click on FB in export module or use the tiny menu icon in the export panel for preferences and try to set up a new connection.

Maybe you are looking for

  • Unable to login with my booklet and IE8 on this si...

    for some reason, i cannot log into this site anymore on my booklet 3g with my IE8 browser.   it only works using firefox. i can log in no problem on other terminals and n900...but not my booklet. i have tried to completely reset the browser to origin

  • XSan backend compatability.

    Is XSan tied to XRaid or can you use other fibre channel drive systems as the back end? We have a DotHill FC disk array an are considering attaching a couple of XServe G5's to form a cluster. However, from my reading you need XSan in order to manage

  • Interaction Record ticket to Email

    Hi Experts I am stuck with this problem: I create a service ticket from ICweb, so first an interaction Record is created then service ticket created. Let's say the service ticket is passed to somebody else to have a look, so with the inbox i look at

  • Applet in linux

    Hi, i want to run applet in linux. here appletviewer command is not working in terminal(comman promt). so i tried using html file, but here aksing plugin download. can any one help me how to run applet in linux)

  • How do I make Photoshop display slice symbols?

    I am using Photoshop CS5, Version12.1 x 64.  OS is Windows 7 Home Edition with Service Pack 1.  Computer has 8.00 GB of RAM,  Processor is Intel (R) Core (TM) i5-3350p,  CPU @ 3.10 GHz..  My video card is NVIDIA Corporation, GeForce 210/PCIe/SSE2. I