Are modules in Flex 4 working correctly? When I load a simple module like this:
<?xml version="1.0"?> <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:s="library://ns.adobe.com/flex/spark"> <mx:Canvas width="100%" height="100%" backgroundColor="#990000"/> </mx:Module> And add it to the stage (addElement(IVisualElement(moduleLoader.child))), the following error is thrown: Error: removeChild() is not available in this class. Instead, use removeElement() or modify the skin, if you have one. at spark.components::Group/removeChild()[E:\dev\trunk\frameworks\projects\spark\src\spark\components\Group.as:1786] at mx.core::Container/addChildAt()[E:\dev\trunk\frameworks\projects\framework\src\mx\core\Container.as:2536] at mx.core::Container/addChild()[E:\dev\trunk\frameworks\projects\framework\src\mx\core\Container.as:2467] at mx.modules::ModuleLoader/moduleReadyHandler()[E:\dev\trunk\frameworks\projects\framework\src\mx\modules\ModuleLoader.as:430] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ModuleInfoProxy/moduleEventHandler()[E:\dev\trunk\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1136] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ModuleInfo/readyHandler()[E:\dev\trunk\frameworks\projects\framework\src\mx\modules\ModuleManager.as:781] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::FlexModuleFactory/update()[E:\dev\trunk\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:390] at mx.core::FlexModuleFactory/timerHandler()[E:\dev\trunk\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:619] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() -- And do this, knowing the time, that now it is high time to awake out of sleep; for now our salvation is nearer than when we first believed.