 		{
 			if (className)
 			{
-				// if no name is specified, generate a unique one now.
-				if (!name)
-					name = generateUniqueName(className.split('::').pop().split('.').pop());
-				var classDef:Class = Weave.getDefinition(className);
-				if (Weave.isLinkable(classDef)
+				var classDef:Class = Weave.getDefinition(className);
+				if (Weave.isLinkable(classDef)
 					&& (_typeRestriction == null || classDef === _typeRestriction || classDef.prototype is _typeRestriction) )
 				{
+					// if no name is specified, generate a unique one now.
+					if (!name)
+					{
+						var baseName:String = className.split('::').pop().split('.').pop();
+						if (name == '')
+							baseName = WeaveAPI.ClassRegistry.getDisplayName(classDef) || baseName;
+						name = generateUniqueName(baseName);
+					}
+					
 //					try
 //					{
 						// If this name is not associated with an object of the specified type,

			{
				removeObject(name);
			}
			return _nameToObjectMap[name];
		}
		
		/**


package weavejs.core
{
	import weavejs.WeaveAPI;
	import weavejs.api.core.DynamicState;
	import weavejs.api.core.ICallbackCollection;
	import weavejs.api.core.IChildListCallbackInterface;
	import weavejs.api.core.ILinkableHashMap;
	import weavejs.api.core.ILinkableObject;
	import weavejs.util.JS;
	
	/**
	 * Allows dynamically creating instances of objects implementing ILinkableObject at runtime.
