X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce7284bd976f469991149a4ff0cd52294b9b61ad..b7c75283f2144469e8fa6a24ca285b42fab69a6b:/wxPython/src/mac/core.py?ds=inline diff --git a/wxPython/src/mac/core.py b/wxPython/src/mac/core.py index 2b0e5149e6..fb9d986036 100644 --- a/wxPython/src/mac/core.py +++ b/wxPython/src/mac/core.py @@ -4958,6 +4958,13 @@ class PyOnDemandOutputWindow: EVT_CLOSE(self.frame, self.OnCloseWindow) + def OnCloseWindow(self, event): + if self.frame is not None: + self.frame.Destroy() + self.frame = None + self.text = None + + # These methods provide the file-like output behaviour. def write(self, text): """ @@ -4982,11 +4989,6 @@ class PyOnDemandOutputWindow: wx.CallAfter(self.frame.Close) - def OnCloseWindow(self, event): - if self.frame is not None: - self.frame.Destroy() - self.frame = None - self.text = None #---------------------------------------------------------------------- @@ -5060,7 +5062,7 @@ your Mac.""" self.RestoreStdio() - def RedirectStdio(self, filename): + def RedirectStdio(self, filename=None): """Redirect sys.stdout and sys.stderr to a file or a popup window.""" if filename: _sys.stdout = _sys.stderr = open(filename, 'a') @@ -8131,6 +8133,8 @@ class SizerItem(Object): """GetProportion() -> int""" return _core.SizerItem_GetProportion(*args, **kwargs) + SetOption = SetProportion + GetOption = GetProportion def SetFlag(*args, **kwargs): """SetFlag(int flag)""" return _core.SizerItem_SetFlag(*args, **kwargs)