0
在我的課程中,我構建了一個Weather VO(Visual Object),現在需要將它用於另一個類。 我將如何使用它來修改我的第二課中文本字段的值?我試圖使用getters和setter來無濟於事。在類之間的動作腳本中使用VO
第一頁:
vo=new WeatherVO();//Visual Object for the weather data
vo.city = _xmlData.channel.ns1::[email protected]+", "+_xmlData.channel.ns1::[email protected];//city, st
vo.currentTemp = _xmlData.channel.item.ns1::[email protected];
vo.currentCondition = _xmlData.channel.item.ns1::[email protected];
vo.currentCode = _xmlData.channel.item.ns1::[email protected];
vo.sunrise = _xmlData.channel.ns1::[email protected];
vo.sunset = _xmlData.channel.ns1::[email protected];
第二頁:
public function set vo(value:WeatherVO):void
{
_weather=value;
}
public function get vo():WeatherVO
{
return _weather;
}