Sub GetWind As ResumableSub
Dim ReturnedWind As Wind
WindDialog.Title = "Enter the Wind"
' Clear out the previous values
WindSettings.Put("WindDirection","")
WindSettings.Put("WindSpeed","")
Wait For (WindDialog.ShowDialog(WindSettings, "OK", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
ReturnedWind.Direction = WindSettings.Get("WindDirection")
ReturnedWind.Speed = WindSettings.Get("WindSpeed")
Return ReturnedWind
Else
Return Null
End If
End Sub