次のようなシミュレートされた列挙型があります。
public class Sport {
public static const BASEBALL:Sport = new MyEnum("Baseball", "Baseball ...");
public static const FOOTBALL:Sport = new MyEnum("Football", "Football ...");
public var label:String;
public var description:String;
public function Sport(label:String, description:String):void {
this.label = label;
this.description = description;
}
}
これらの列挙型にバインドするボタンは次のとおりです。
<mx:Button label="{Sport.BASEBALL.label}" toolTip="{Sport.BASEBALL.description}"/>
この列挙型をローカライズする必要がありますが、ロケールを更新するときにバインディングを他のすべてのものと一緒に更新するのはうまくいきませんでした:
resourceManager.localeChain = [ localeComboBox.selectedItem ];
ResourceManagerによってスローされると思われる「変更」イベントにゲッターをバインドしようとしましたが、うまくいかないようです。何か案は?