MainFrame not displayed; only a small, empty window

With Werner's patient help I have the splash screen and login dialog
correctly working. However, when the login dialog is closed a small, empty
window is displayed rather than the larger window with the main frame and
included notebook.

   I've run winpdb with a breakpoint at
class pwMainFrame(wx.Frame):

but when I step into this class I'm not seeing the error. I suspect the
issue arises at the end of the module:

class pwApp(wx.App, InspectionMixin):
     def OnInit(self):
         self.SetAppName("PermitWatch")

         # Create and show the splash screen.
         self._loginShown = False
         splash = pwSplashScreen(caller=self)

         return True

     def showLogin(self):
         if not self._loginShown:
             self._loginShown = True
             self.doShowLogin()

     def doShowLogin(self):
         with LoginDialog() as dlg:
             dlg.ShowModal()
             loginState = dlg.loginState

             if loginState:
                 self.pwMainFrame = wx.Frame(None)
                 wx.GetApp().SetTopWindow(self.pwMainFrame)
                 self.pwMainFrame.Show()

if __name__ == '__main__':
     app = pwApp()
     app.MainLoop()

   Advice on applying winpdb to find where the application falls off the
track is needed.

TIA,

Rich

Hello fuzzydoc,

         if loginState:

             self.pwMainFrame = wx.Frame(None)

Here you create a new Frame but don’t add any widgets to it …

             wx.GetApp().SetTopWindow(self.pwMainFrame)

             self.pwMainFrame.Show()

… and then immediately show it.

···

Torsten

Torsten,

   Thank you. That was changed from previous:

   frame = pwMainFrame(None, -1, "")
         frame.Show()

   Changing back to that fixed the problem.

Rich

···

On Mon, 28 Jul 2014, Torsten wrote:

Here you create a new Frame but don't add any widgets to it ...

                wx.GetApp().SetTopWindow(self.pwMainFrame)

                 self.pwMainFrame.Show()

... and then immediately show it.