0
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:RadioButton id="radio" />
<mx:Script>
public override function set label(value:String):void {
this.radio.label = value;
}
public override function get label():String {
return this.radio.label;
}
</mx:Script>
</mx:VBox>
CustomRadio 예를 들어 사용자 정의 MXML 구성 요소 및 응용 프로그램
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*">
<local:CustomRadio label="xxx" />
</mx:WindowedApplication>
을하고 난 this.radio가 null의 말을 세트 라벨에 널 참조 arror를 얻을. 왜 ?
아니요. 작동하지 않습니다 : ( –
값이 사용되기 전에 'set'함수에 중단 점을 설정하면 (여기에 추적 또는 유사한 것을 넣음) - 'this'포인터에 정의 된 라디오 버튼의 일부입니까? – ethrbunny
시도하십시오 this : http://cookbooks.adobe.com/post_Button_with_html_text-14186.html -> 'this'대신 'super'가 필요합니다. – ethrbunny