本文介绍了Flex 3.6 到 4.6/4.9 的迁移问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在迁移到版本 4.6/4.9 时收到以下错误.同样的事情在 flex 3.6 版中也能正常工作.
I am getting the following error while migrating to version 4.6/4.9. Same thing works fine in flex version 3.6.
有人可以帮我解决吗?
4.6 错误
TypeError: Error #1034: Type Coercion failed: cannot convert "/" to flash.display.DisplayObject.
at mx.charts.chartClasses::ChartBase/ttp://www.adobe.com/2006/flex/mx/internal::addElements()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\chartClasses\ChartBase.as:4302]
at mx.charts.chartClasses::CartesianChart/ttp://www.adobe.com/2006/flex/mx/internal::updateSeries()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\chartClasses\CartesianChart.as:1041]
at mx.charts.chartClasses::ChartBase/commitProperties()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\chartClasses\ChartBase.as:1918]
at mx.charts.chartClasses::CartesianChart/commitProperties()[**E:\dev\4.y**\frameworks\projects\charts\src\mx\charts\chartClasses\CartesianChart.as:934]
at mx.core::****UIComponent/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8219****]
at mx.managers::LayoutManager/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:597]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:783]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]
4.9 错误
TypeError: Error #1034: Type Coercion failed: cannot convert "/" to flash.display.DisplayObject.
at mx.charts.chartClasses::ChartBase/ttp://www.adobe.com/2006/flex/mx/internal::addElements()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as:4310]
at mx.charts.chartClasses::CartesianChart/ttp://www.adobe.com/2006/flex/mx/internal::updateSeries()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as:1050]
at mx.charts.chartClasses::ChartBase/commitProperties()[/Users/justinmclean/Documents/**ApacheFlexSDK**/frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as:1926]
at mx.charts.chartClasses::CartesianChart/commitProperties()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as:943]
at mx.core::UIComponent/validateProperties()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/core/UIComponent.as:8227]
at mx.managers::LayoutManager/validateProperties()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:605]
at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:791]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188]
推荐答案
您正在 CartesianChart 中的代码中需要 DisplayObject 的地方传递字符串/"
You are passing a String "/" in a CartesianChart somewhere in your code where it expects a DisplayObject
Type Coercion failed: cannot convert "/" to flash.display.DisplayObject.
这篇关于Flex 3.6 到 4.6/4.9 的迁移问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!