explicitly check platforms until I figure out a better way to do it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25931
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
# Author: Jeff Grimmett (grimmtoo@softhome.net), adapted from original
# .wdr-derived demo
#
# Author: Jeff Grimmett (grimmtoo@softhome.net), adapted from original
# .wdr-derived demo
#
# RCS-ID: $Id$
# Copyright:
# Licence: wxWindows license
# RCS-ID: $Id$
# Copyright:
# Licence: wxWindows license
+haveJoystick = True
+if wx.Platform == "__WXMAC__":
+ haveJoystick = False
+
#----------------------------------------------------------------------------
# Once all supported versions of Python support 32-bit integers on all
#----------------------------------------------------------------------------
# Once all supported versions of Python support 32-bit integers on all
#----------------------------------------------------------------------------
def runTest(frame, nb, log):
#----------------------------------------------------------------------------
def runTest(frame, nb, log):
- win = JoystickDemoPanel(nb, log)
- return win
+ if haveJoystick:
+ win = JoystickDemoPanel(nb, log)
+ return win
+ else:
+ dlg = wx.MessageDialog(
+ frame, 'wx.Joystick is not available on this platform.',
+ 'Sorry', wx.OK | wx.ICON_INFORMATION
+ )
+ dlg.ShowModal()
+ dlg.Destroy()
+
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
import wx
havePopupWindow = 1
import wx
havePopupWindow = 1
-try:
- wx.PopupWindow
-except NameError:
+if wx.Platform == '__WXMAC__':
havePopupWindow = 0
wx.PopupWindow = wx.PopupTransientWindow = wx.Window
havePopupWindow = 0
wx.PopupWindow = wx.PopupTransientWindow = wx.Window
frame, 'wx.PopupWindow is not available on this platform.',
'Sorry', wx.OK | wx.ICON_INFORMATION
)
frame, 'wx.PopupWindow is not available on this platform.',
'Sorry', wx.OK | wx.ICON_INFORMATION
)
dlg.ShowModal()
dlg.Destroy()
dlg.ShowModal()
dlg.Destroy()
import wx
haveToggleBtn = 1
import wx
haveToggleBtn = 1
-
-try:
- wx.ToggleButton
-except NameError:
+if wx.Platform == "__WXX11__":
haveToggleBtn = 0
#----------------------------------------------------------------------
haveToggleBtn = 0
#----------------------------------------------------------------------