 		{
 			dockChanged = false;
 
-			if (parent is Application)
-				Application(parent).dockControlBar(this, _dock);
+            var applicationClass:Class = Class(systemManager.getDefinitionByName("mx.core::Application"));
+			if (applicationClass && parent is applicationClass)
+				applicationClass(parent).dockControlBar(this, _dock);
 		}
 	}
 	

	/**
	 *  If <code>true</code>, specifies that the ApplicationControlBar should be docked to the
	 *  top of the application. If <code>false</code>, specifies that the ApplicationControlBar 
	 *  gets sized and positioned just like any other component.
	 *
	 *  @default false
	 */

{

import flash.events.Event;
import mx.core.mx_internal;
import mx.styles.IStyleClient;

