2
votes

I'm using a licensed version of Flex Builder Pro to develop an application.

I compiled the swc and generated swf successfully using ANT tasks. It contains an Advanced Data Grid also. When this application is accessed, I get a runtime error and it fails to load.

TypeError: Error #1007: Instantiation attempted on a non-constructor. at mx.controls::AdvancedDataGridBaseEx/getSeparator() at mx.controls::AdvancedDataGridBaseEx/createHeaderSeparators() at mx.controls::AdvancedDataGrid/createHeaderSeparators() at mx.controls::AdvancedDataGridBaseEx/drawSeparators() at mx.controls::AdvancedDataGridBaseEx/updateDisplayList() at mx.controls::AdvancedDataGrid/updateDisplayList() at mx.controls.listClasses::AdvancedListBase/validateDisplayList() at mx.managers::LayoutManager/validateDisplayList() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher()

I'm adding datavisualization.swc and datavisualization_rb.swc in the build paths.

How can I successfully compile the application without any runtime errors?

Please help.

3

3 Answers

0
votes

Include the swcs in the library path as shown here.

0
votes

By coincidence I had the same error a couple of days ago. The source of this problem was a library against I built, which was linked statically against an older version of the datavisualization libraries. Normally libraries should only be compiled against other libraries using the external-library-path compiler option, but this library was compiled incorrectly.

So that library contained older parts of datavisualization that were referenced by code in the library, while my code referenced newer parts from the datavisualization library itself. The result was a mix of older and newer datavisualization classes at runtime.

So check the SWCs that you include in your library path. You can extract these with a ZIP tool. You will then find a catalog.xml file in there. Search for mx/controls/AdvancedDataGrid in this file. In case you can see it included in the catalog, you've found the bogus library.