Anyone tell me why this doesn't work.

 

var ClassName:String = 'views.pr.ProjectView';

var ClassReference:Class = getDefinitionByName(ClassName) as Class;

var instance:UIComponent = new ClassReference();

child.addChild( instance );

 

ReferenceError: Error #1065: Variable ProjectView is not defined.

      at global/flash.utils::getDefinitionByName()

      at Main/addTab()[C:\ Central\Flex\src\Main.mxml:86]

      at Main/treeChanged()[C:\ Central\Flex\src\Main.mxml:52]

      at Main/__menuTree_click()[C:\ Central\Flex\src\Main.mxml:138]

 

 

Regards

Dale Fraser

http://learncf.com <http://learncf.com/> 

http://flexcf.com <http://flexcf.com/> 

 

 

Reply via email to