Permalink
Browse files

Change ModuleManager.moduleMap to use Dictionary.

Remove log info.
  • Loading branch information...
1 parent a55704a commit 784f0220369371d403c32446103b0715f3cb863c @wersling committed Nov 30, 2011
Showing with 5 additions and 7 deletions.
  1. +0 −3 src/net/manaca/modules/ModuleInfo.as
  2. +5 −4 src/net/manaca/modules/ModuleManager.as
@@ -14,7 +14,6 @@ import flash.utils.ByteArray;
import net.manaca.loaderqueue.LoaderQueue;
import net.manaca.loaderqueue.LoaderQueueEvent;
import net.manaca.loaderqueue.adapter.LoaderAdapter;
-import net.manaca.logging.Tracer;
//--------------------------------------
// Events
@@ -250,7 +249,6 @@ public class ModuleInfo extends EventDispatcher implements IModuleInfo
loader_errorHandler);
loader.addEventListener(LoaderQueueEvent.TASK_PROGRESS,
loader_progressHandler);
- Tracer.debug("[Module] loading module : " + urlRequest.url);
loaderQueue.addItem(loader);
}
}
@@ -333,7 +331,6 @@ public class ModuleInfo extends EventDispatcher implements IModuleInfo
private function loader_errorHandler(event:LoaderQueueEvent):void
{
_error = true;
- Tracer.error("[Module] " + event.toString());
var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR);
moduleEvent.errorText = event.toString();
dispatchEvent(moduleEvent);
@@ -3,7 +3,8 @@
*/
package net.manaca.modules
{
-import net.manaca.data.Map;
+import flash.utils.Dictionary;
+
import net.manaca.loaderqueue.LoaderQueue;
/**
@@ -20,7 +21,7 @@ public class ModuleManager
/**
* @private
*/
- static private const moduleMap:Map = new Map();
+ static private const moduleMap:Dictionary = new Dictionary();
/**
* @praivte
@@ -66,7 +67,7 @@ public class ModuleManager
var vo:ModuleVO;
for each(vo in moudles)
{
- moduleMap.put(vo.name, vo);
+ moduleMap[vo.name] = vo;
}
loaderQueueIns = loaderQueue;
}
@@ -79,7 +80,7 @@ public class ModuleManager
*/
static public function getModuleVOByName(moduleName:String):ModuleVO
{
- return moduleMap.getValue(moduleName);
+ return moduleMap[moduleName];
}
/**

0 comments on commit 784f022

Please sign in to comment.