当前位置: 代码迷 >> Web前端 >> loadModuleReady使用中发现的有关问题
  详细解决方案

loadModuleReady使用中发现的有关问题

热度:116   发布时间:2012-11-06 14:07:00.0
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的一次初始化。

?

?

?

  相关解决方案