views:

415

answers:

3

Hi,

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%3A%3Aapply() 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.

A: 

Include the swcs in the library path as shown here.

Brandon
I dont have a problem with adding swc's in library paths. That is working fine and the final swf is also generated. But when the swf is launched in the browser, it gives a runtime error when a tab containing advanced data grid is loaded.
whoopy_whale
I asked because I noticed a difference when I accidentally used External Library Path versus Library Path and wondered if you may have done the same.
Brandon
A: 

Maybe this helps: http://kb2.adobe.com/cps/403/kb403121.html

Yaba
But dmv_automation_build.xml is not present with Flex SDK,right? In the FlexBuilder SDK, this file appears to be correct only.
whoopy_whale
A: 

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.

Yaba