1 Reply Latest reply on Jul 26, 2007 1:44 AM by Yann Martel

    ModuleLoader bug

    Yann Martel
      Hello everybody.

      Loading and unloading module crashes my application. Here is a little example:

      ColorPickerModule.mxml :
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Module xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:ColorPicker />
      </mx:Module>

      TestModuleLoader.mxml :
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">
      <mx:Button label="unload" click="loader.unloadModule()"/>
      <mx:Button label="load" click="loader.loadModule()"/>
      <mx:ModuleLoader id="loader" url="ColorPickerModule.swf" />
      </mx:Application>


      If I unload the module, then reload it, the app crashes when I click on the colorPicker:
      ypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
      at mx.managers::PopUpManager$/addPopUp()[E:\dev\flex_3_beta1\sdk\frameworks\projects\framewo rk\src;mx\managers;PopUpManager.as:148]
      at mx.controls::ColorPicker/ http://www.adobe.com/2006/flex/mx/internal::displayDropdown()[E:\dev\flex_3_beta1\sdk\fram eworks\projects\framework\src;mx\controls;ColorPicker.as:1096
      at mx.controls::ColorPicker/mx.controls:ColorPicker::downArrowButton_buttonDownHandler()[E:\ dev\flex_3_beta1\sdk\frameworks\projects\framework\src;mx\controls;ColorPicker.as:1410]
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta1\sdk\frameworks\projects\framewor k\src;mx\core;UIComponent.as:8530]
      at mx.controls::Button/ http://www.adobe.com/2006/flex/mx/internal::buttonPressed()[E:\dev\flex_3_beta1\sdk\framew orks\projects\framework\src;mx\controls;Button.as:2370
      at mx.controls::Button/mx.controls:Button::mouseDownHandler()[E:\dev\flex_3_beta1\sdk\framew orks\projects\framework\src;mx\controls;Button.as:2616]
      at [mouseEvent]


      Am I doing something wrong, or is this a bug ?