自定义组件问题
mzx87 2011-01-25 11:50:52 我现在需要根据传入的数据来动态的生成TabBar
public function CustomTabBar() {
super();
this.tabheight = tabheight;
tablist = new Vector.<TabBar>();
this.verticalScrollPolicy="off";
_dataProvider = new ArrayCollection();
}
public function set dataProvider (value:ArrayCollection)
{
_dataProvider =value;
}
override protected function createChildren():void
{
mx.controls.Alert.show("createChildren:"+this._dataProvider .length.toString());
super.createChildren();
this.validateNow();
}
现在在createChildren里获取不到_dataProvider的值
setter是属于配置阶段 createChildren是初始化阶段 组件的生命周期是配置-----》初始化 为什么现在没法获取到属性值呢
求高手解答