Avg. Rating 3.0

Problem

Hi people. I'm trying to create an object at runtime, just passing the classname as a parameter I already tried that with a standard Flex Component and it worked very well. BUT, when I try to do this with one of my components, an error occurs: ReferenceError: Error #1065: Variable [myComponentClassName] is not defined. Thanks.

Solution

Did you make sure your class is getting compiled ? Because if it's not referenced anywhere else in the application it is not compiled, and thus it is not possible to create any instance of it.

Detailed explanation

Try to declare your class somewhere in the code, then if it's still not working, describe the code you use to create a new instance of your class.


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes