Dans ma classe, j'ai construit un objet VO (Weather Object) et je dois maintenant l'utiliser pour une autre classe. Comment l'utiliser pour modifier les valeurs du champ de texte dans ma deuxième classe? J'ai essayé d'utiliser des getters et setters en vain.Utilisation d'une VO en actionscript entre les classes
Première page:
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];
la page Deuxième:
public function set vo(value:WeatherVO):void
{
_weather=value;
}
public function get vo():WeatherVO
{
return _weather;
}