]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Throbber.py
Fix "warning: operation on 'y' may be undefined".
[wxWidgets.git] / wxPython / demo / Throbber.py
index 3096c4850c36b0adede47a37a83968c7844c7e7a..10b91c667ebee4ddde86d16cb870e4bf063e54e5 100644 (file)
@@ -69,22 +69,11 @@ class TestPanel(wx.Panel):
             pointSize = 8, family = wx.DEFAULT, style = wx.NORMAL, weight = wx.BOLD
             ))
 
-        # this throbber is created using a single, composite image
-        self.otherThrobber = throb.Throbber(
-            self, -1, throbImages.catalog['eclouds'].getBitmap(), frameDelay = 0.15, 
-            frames = 12, frameWidth = 48, label = "Stop"
-            )
-
-
-        self.otherThrobber.Bind(wx.EVT_LEFT_DOWN, self.OnClickThrobber)
-
         box = wx.BoxSizer(wx.VERTICAL)
         sizer = wx.GridBagSizer()
         box.Add(sizer, 1, wx.EXPAND|wx.ALL, 5)
         sizer.AddGrowableCol(1)
 
-        sizer.Add(self.otherThrobber, (0, 2), (4, 1),flag = wx.ALIGN_CENTER_VERTICAL)
-
         row = 2
 
         # use a list so we can keep our order
@@ -127,9 +116,6 @@ class TestPanel(wx.Panel):
         for t in self.throbbers.keys():
             self.throbbers[t]['throbber'].Start()
 
-        self.otherThrobber.Start()
-        self.otherThrobber.Reverse()
-
         self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy)
 
     def OnDestroy(self, event):
@@ -144,16 +130,7 @@ class TestPanel(wx.Panel):
         for t in self.throbbers.keys():
             self.throbbers[t]['throbber'].Rest()
 
-    def OnClickThrobber(self, event):
-        if self.otherThrobber.Running():
-            self.otherThrobber.Rest()
-            self.otherThrobber.SetLabel("Start")
-        else:
-            self.otherThrobber.Start()
-            self.otherThrobber.SetLabel("Stop")
-
     def ShutdownDemo(self):
-        self.otherThrobber.Rest()
         for t in self.throbbers.keys():
             self.throbbers[t]['throbber'].Rest()
 
@@ -161,13 +138,8 @@ class TestPanel(wx.Panel):
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
-    if wx.Platform == "__WXMAC__":
-        wx.MessageBox("This demo currently fails on the Mac.",
-                     "Sorry")
-        return
-    else:
-        win = TestPanel(nb, log)
-        return win
+    win = TestPanel(nb, log)
+    return win
 
 #----------------------------------------------------------------------
 
@@ -184,4 +156,4 @@ overview = """<html><body>
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])