 			if (!library || WeaveAPI.SessionManager.objectWasDisposed(library))
 				_libraries[url] = library = new Library(url);
 			
+//			library.addAsyncResponder(handleSWCLoaded, null, url);
 			library.addAsyncResponder(asyncResultHandler, asyncFaultHandler, token);
 		}
 		
+//		/**
+//		 * @private
+//		 */		
+//		private static function handleSWCLoaded(event:ResultEvent, token:Object = null):void
+//		{
+//			var url:String = token as String;
+//			var defs:Array = event.result as Array;
+//			var isLoaded:Boolean = isSWCLoaded(url);
+//			for each (var def:String in defs)
+//				
+//				_classQNames[def] = isLoaded
+//					
+//			//todo: check all class defs before loading swf, remove the ones that already exist
+//			// once swf is loaded, only bother initializing the ones that didn't already exist.
+//			// keep a mapping between those classes and the swc url
+//		}
+//		
+//		/**
+//		 * This object maps a qualified class name to a value of true if the class should be made available through getClassDefinition(). 
+//		 */		
+//		private static const _classQNames:Object = {};
+//		
+//		public static function isSWCLoaded(url:String):Boolean
+//		{
+//			return false;
+//		}
+//		
 //		/**
 //		 * This function will unload a previously loaded SWC library.
 //		 * @param url The URL of the SWC library to unload.

	 */
	public class LibraryUtils
	{
		/**
		 * This function loads a SWC library into the current ApplicationDomain so getClassDefinition() and getDefinitionByName() can get its class definitions.
		 * The result passed to the asyncResultHandler function will be an Array containing the qualified class names of all the classes defined in the library.

			_catalog_xml = XML(zipFile.getInput(zipFile.getEntry("catalog.xml")));
			zipFile = null;
			
			_swfLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleSWFFault);
			_swfLoader.addEventListener(IOErrorEvent.IO_ERROR, handleSWFFault);
			_swfLoader.addEventListener(ProgressEvent.PROGRESS, handleSWFProgress);
			_swfLoader.addEventListener(Event.COMPLETE, handleSWFResult);
			
			// Dynamic creation of Flex classes doesn't work unless the library is loaded into the same application domain.
			_swfLoader.loaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
			_swfLoader.load(_library_swf);
			
			WeaveAPI.ProgressIndicator.addTask(_swfLoader);
