This morning I copied Dialog.py from the 3.0.0.0 demo/ directory and
modifed it to function as the application's login dialog. Found and
corrected syntactical errors yet the script does not display the dialog in
a
frame.
Knowing that I missed something that should be included, I ran the script
within winpdb. Unfortunately, the debugger showed me no errors. Both
running
it (with the 'Go' button) and stepping through the code went to the end
without displaying anything or indicating an error. At least, my reading of
the debuggee status did not reveal an obvious error to me.
I've attached the 4k script and would appreciate learning what I did
incorrectly, or left out, that does not reveal what the error might be.
Leaning why I get this response will also be helpful in avoiding it in the
future.
Hi Rich. Yes, there are no syntax errors. The issue is just that you
never call frame.Show() to show the frame. So you can add that at the
bottom, like so:
if __name__ == '__main__':
app = wx.App(False)
frame = MainFrame(None, -1, "")
frame.Show() # <----- the missing part
app.MainLoop()
But, once you do that you'll see that you just have a big grey blank
frame. But this is still not an error, because that is all that is defined
in your MainFrame class.
If, instead, you would like to see the wxDialog you made, you would want
the "frame" to refer to that, so you can change the block above to:
if __name__ == '__main__':
app = wx.App(False)
frame = LoginDialog(None, -1, "")
frame.Show()
app.MainLoop()
However, when you try to run *that* you will see there are two
AttributeErrors that you will get, but I bet you can figure that out easily
(recall I said AttributeErrors are often pleasant bugs to hunt down), so
I'll leave that as practice. 
Che
···
On Tue, Jul 8, 2014 at 8:48 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:
Rich
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.