owentar / x-copilot-py

MIT License
1 stars 0 forks source link

Adding a widget callback conflicts with noaaWeather plugin #24

Open owentar opened 7 years ago

owentar commented 7 years ago

Check why if we add this widget callback (to handle the close button in the widget) causes this error to happen:

Error:

Traceback (most recent call last):
  File "D:/Steam/steamapps/common/X-Plane 10/Resources/plugins/PythonScripts\PI_noaaWeather.py", line 1417, in floopCallback
    self.weather.alt = self.altdr.value
TypeError: an integer is required

Code:

self.widgetCB = self.widgetCallback
XPAddWidgetCallback(self.plugin, self.widgetId, self.widgetCB)

def widgetCallback(self, inMessage, inWidget, _, __):
        if inMessage == xpMessage_CloseButtonPushed:
            XPHideWidget(self.widgetId)