1、错误描写叙述
ReferenceError: Error #1069: 在 spark.components.RadioButtonGroup 上找不到属性 label,且没有默认值。at Chart/radiogroup_itemClickHandler()[E:Flash BuilderMapsrcChart.mxml:49] at Chart/__radiogroup_itemClick()[E:Flash BuilderMapsrcChart.mxml:58] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at spark.components::RadioButton/buttonReleased()[E:dev4.0.0frameworksprojectssparksrcsparkcomponentsRadioButton.as:554] at spark.components.supportClasses::ButtonBase/mouseEventHandler()[E:dev4.0.0frameworksprojectssparksrcsparkcomponentssupportClassesButtonBase.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>