X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0122b7e3fcfd78f879470053c91a60e3c66537a3..3d7a4fe81fa69e9c518a62174ef584bdbb6af7c3:/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! <frown>\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! <grin>\n")
+        else:
+            self.log.write("The objects are NOT the same! <frown>\n")
+
 
 #----------------------------------------------------------------------
 
@@ -125,3 +136,12 @@ and the second will show #2 (<i>working as of 2.3.2</i>)
 
 </body></html>
 """
+
+
+
+
+if __name__ == '__main__':
+    import sys,os
+    import run
+    run.main(['', os.path.basename(sys.argv[0])])
+