本文主要是介绍Flex4 css中skin设置报错解决,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Flex4 css中skin设置
header-background-skin:"MySkin";
运行时报错:
TypeError: Error #1034: 强制转换类型失败:无法将 "MySkin" 转换为 Class。
at mx.controls.dataGridClasses::DataGridHeader/updateDisplayList()[E:/dev/hero_private_beta/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridHeader.as:331]
at mx.core::UIComponent/validateDisplayList()[E:/dev/hero_private_beta/frameworks/projects/framework/src/mx/core/UIComponent.as:8876]
at mx.managers::LayoutManager/validateClient()[E:/dev/hero_private_beta/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1010]
at mx.core::UIComponent/validateNow()[E:/dev/hero_private_beta/frameworks/projects/framework/src/mx/core/UIComponent.as:7953]
at mx.controls.dataGridClasses::DataGridBase/updateDisplayList()[E:/dev/hero_private_beta/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridBase.as:594]
at mx.controls::DataGrid/updateDisplayList()[E:/dev/hero_private_beta/frameworks/projects/mx/src/mx/controls/DataGrid.as:1741]
at mx.controls.listClasses::ListBase/validateDisplayList()[E:/dev/hero_private_beta/frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as:3964]
at mx.managers::LayoutManager/validateDisplayList()[E:/dev/hero_private_beta/frameworks/projects/framework/src/mx/managers/LayoutManager.as:719]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:/dev/hero_private_beta/frameworks/projects/framework/src/mx/managers/LayoutManager.as:778]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:/dev/hero_private_beta/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1157]
解决办法:
header-background-skin:ClassReference("MySkin");
原理:
强行转换
这篇关于Flex4 css中skin设置报错解决的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!