I'm getting a runtime error every time that I try to use addChild() to
add a Chart Legend to the application. Has anyone ever seen this or
have any ideas?
Here is the error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at mx.core::Container/mx.core:Container::createBorder()
at mx.core::Container/styleChanged()
at
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addingChild()
at
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingChild()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
at ChartingApplication/::addChart()
at ChartingApplication/::setupColumnChart()
at ChartingApplication$iinit()
at Charting$iinit()
at _Charting_mx_managers_SystemManager/create()
at mx.managers::SystemManager/::initializeTopLevelWindow()
at mx.managers::SystemManager/::docFrameHandler()
and here is the code that will do it:
addChild(new mx.charts.Legend());
that is a simplified line of code but it produces the same issue.
I've looked at all kinds of examples and seen others to it without
issue but for some reason if I add a Legend I get the error.
Thanks.