读书人

loadModuleReady使用中发现的有关问题

发布时间: 2012-11-06 14:07:00 作者: rapoo

loadModuleReady使用中发现的问题

?

private function loadModuleReady(e:ModuleEvent):void{var iModule:IModuleParam=e.module.factory.create() as IModuleParam;*.main.moduleContainer.removeAllChildren();//此处只可以使用一次e.module.factory.create,没使用一次其实就是实例化一次//*.main.moduleContainer.addChild(e.module.factory.create() as DisplayObject);(this.parentApplication as p8).main.moduleContainer.addChild(iModule as DisplayObject);if (iModule){iModule.setSocket(this._modelLocator.socket);iModule.setRemoteObj(ServiceLocator.getInstance().getRemoteObject("Remoting_Services"));iModule.setType(0);}}
?

?

?

在上面的响应方法中:

e.module.factory.create只可使用一次,

每使用一次就是对module的一次初始化。

?

?

?

读书人网 >Web前端

热点推荐