ReferenceError: Error #1069: 在 spark.components.RadioButtonGroup 上找不到属性 label,且没有默认值

时间:2023-12-30 12:22:08

1、错误描写叙述

ReferenceError: Error #1069: 在 spark.components.RadioButtonGroup 上找不到属性 label,且没有默认值。

at Chart/radiogroup_itemClickHandler()[E:\Flash Builder\Map\src\Chart.mxml:49]
at Chart/__radiogroup_itemClick()[E:\Flash Builder\Map\src\Chart.mxml:58]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at spark.components::RadioButton/buttonReleased()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\RadioButton.as:554]
at spark.components.supportClasses::ButtonBase/mouseEventHandler()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\ButtonBase.as:1054]

2、错误原因

protected function radiogroup_itemClickHandler(event:ItemClickEvent):void
{
if(event.currentTarget.label=="周")
{
Alert.show("OK!");
}
}
<fx:Declarations>
<s:RadioButtonGroup id="radiogroup" itemClick="radiogroup_itemClickHandler(event)"/>
</fx:Declarations>

3、解决的方法