X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0122b7e3fcfd78f879470053c91a60e3c66537a3..71aba8333cc915afff9e740c944f7fa7247abacb:/wxPython/demo/OOR.py diff --git a/wxPython/demo/OOR.py b/wxPython/demo/OOR.py index 7306ed9efd..d58bc42bbd 100644 --- a/wxPython/demo/OOR.py +++ b/wxPython/demo/OOR.py @@ -30,7 +30,9 @@ class TestPanel(wxPanel): sizer.Add(btns, 0, wxEXPAND|wxALL, 15) self.SetSizer(sizer) - self.SetAutoLayout(true) + self.SetAutoLayout(True) + + self.sizer = sizer # save it for testing later EVT_BUTTON(self, BTN1, self.OnFindButton1) EVT_BUTTON(self, BTN2, self.OnFindButton2) @@ -68,6 +70,15 @@ class TestPanel(wxPanel): else: self.log.write("The objects are NOT the same! \n") + sizer = self.GetSizer() + if sizer is None: + self.log.write("***** OOPS! None returned...\n") + return + if sizer is self.sizer: + self.log.write("The objects are the same! \n") + else: + self.log.write("The objects are NOT the same! \n") + #---------------------------------------------------------------------- @@ -125,3 +136,12 @@ and the second will show #2 (working as of 2.3.2) """ + + + + +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) +