1
0
Fork 0

update metar data in textfield when metar changes during live data fetch

This commit is contained in:
torsten 2009-06-08 19:36:02 +00:00
parent f9dd1e72e3
commit 058364f4fd

View file

@ -213,6 +213,14 @@
setprop("sim/gui/dialogs/weather-scenario/metar", metar );
});
var metarListener = setlistener( "environment/metar/data", func(n) {
var metar = n.getValue();
if( metar == nil ) metar = "";
metar = normalize_string(metar);
setprop("sim/gui/dialogs/weather-scenario/metar", metar );
gui.dialog_update( "weather_scenario", "metar" );
}, 1, 0);
#initialize the METAR source selection
if( getprop( "environment/params/metar-updates-environment" ) == 0 ) {
setprop("sim/gui/dialogs/weather-scenario/source-selection", "Disabled" );
@ -256,6 +264,7 @@
<close><![CDATA[
removelistener( propertyChangeListener );
removelistener( metarListener );
]]></close>
</nasal>