X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0122b7e3fcfd78f879470053c91a60e3c66537a3..3f4f90c2a0c1f274d1918b320132ed0ca2922fe5:/wxPython/demo/OOR.py?ds=sidebyside diff --git a/wxPython/demo/OOR.py b/wxPython/demo/OOR.py index 7306ed9efd..9b4088fb8d 100644 --- a/wxPython/demo/OOR.py +++ b/wxPython/demo/OOR.py @@ -32,6 +32,8 @@ class TestPanel(wxPanel): self.SetSizer(sizer) 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") + #----------------------------------------------------------------------