您好,我在以下代码段中收到错误 this._radioButtons 未定义(** 之间的代码)。我在这里缺少关于关闭的东西吗?
_adjustChoices: function(choices) {
// TODO Tear down all the old radion buttons and their change handlers.
debugger;
this._radioButtons = [];
this._changeHandlers = [];
array.forEach(choices, function(choice) {
var radioButton = new RadioButton(lang.mixin({
name: this._clusterName
}, choice));
**this._radioButtons.push(radioButton);**
this._changeHandlers.push(connect.connect, radioButton, "onChange", lang.hitch(this, function(value) {
// TODO Figure out which radio button is selected and get its value.
//var radioButton = ????;
this.set("value", radioButton.get("checked"));
}));
});
},