From 245f9233fc20cdcb58c42af3e6043a699099909f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 12 Dec 2002 06:14:56 +0000 Subject: [PATCH] Throbber fixes, other tweaks to the demo git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/Main.py | 1 + wxPython/demo/wxMiniFrame.py | 1 + wxPython/demo/wxSplitterWindow.py | 8 ++++++-- wxPython/wxPython/lib/throbber.py | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index d6727f8545..6f313ba328 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -448,6 +448,7 @@ class wxPythonDemo(wxFrame): if self.nb.GetPageCount() == 3: if self.nb.GetSelection() == 2: self.nb.SetSelection(0) + wxSafeYield() # in case the page has pending events self.nb.DeletePage(2) if itemText == self.overviewText: diff --git a/wxPython/demo/wxMiniFrame.py b/wxPython/demo/wxMiniFrame.py index 2e947486e8..9d9785c67b 100644 --- a/wxPython/demo/wxMiniFrame.py +++ b/wxPython/demo/wxMiniFrame.py @@ -17,6 +17,7 @@ class MyMiniFrame(wxMiniFrame): self.Close(true) def OnCloseWindow(self, event): + print "OnCloseWindow" self.Destroy() #--------------------------------------------------------------------------- diff --git a/wxPython/demo/wxSplitterWindow.py b/wxPython/demo/wxSplitterWindow.py index fac9cbee57..206244f6c0 100644 --- a/wxPython/demo/wxSplitterWindow.py +++ b/wxPython/demo/wxSplitterWindow.py @@ -35,8 +35,12 @@ def runTest(frame, nb, log): wxStaticText(p2, -1, "Panel Two", wxPoint(5,5)).SetBackgroundColour(wxBLUE) splitter.SetMinimumPaneSize(20) - splitter.SplitVertically(p1, p2) - splitter.SetSashPosition(100) + splitter.SplitVertically(p1, p2, 100) + +## splitter.SetSize((300,300)) +## print splitter.GetSashPosition() +## splitter.SetSashPosition(100) +## print splitter.GetSashPosition() return splitter diff --git a/wxPython/wxPython/lib/throbber.py b/wxPython/wxPython/lib/throbber.py index 9da0501d8a..5f3f899191 100644 --- a/wxPython/wxPython/lib/throbber.py +++ b/wxPython/wxPython/lib/throbber.py @@ -149,7 +149,7 @@ class Throbber(wxPanel): def UpdateThread(self): try: - while not self.event.isSet(): + while hasattr(self, 'event') and not self.event.isSet(): wxPostEvent(self, UpdateThrobberEvent()) self.event.wait(self.frameDelay) except wxPyDeadObjectError: # BUG: we were destroyed