exit app with splashscreen not working

19 views
Skip to first unread message

Neil Thornock

unread,
Jun 21, 2016, 6:16:23 PM6/21/16
to wxPython-users
I'm not understanding something. I'm trying to get a splash screen on my application. When the splash screen is disabled, everything works fine. But once I put the splash screen in the app, I can't close the app. I get "NameError: global name 'app' is not defined". If I comment out the line "app.OnClose()" the main loop doesn't terminate when I close the program. Does the splash screen somehow kill the instance of App?

How am I supposed to do this?

Thanks for the help!
splashtest.py

Scott Talbert

unread,
Jun 21, 2016, 8:12:17 PM6/21/16
to wxPython-users
Your code works fine for me (once I supplied a bitmap).

Are you using Classic or Phoenix? What OS and toolkit?

Neil Thornock

unread,
Jun 21, 2016, 11:37:27 PM6/21/16
to wxpytho...@googlegroups.com
I'm using Classic on Mac.

I worked around the problem using the attached, moving the splash outside the rest of the code, but it seems like bad style -- ? Is there something bad about this solution? Anything better I should be doing?

Thank you, Scott, for the reply.
splashtest.py
Reply all
Reply to author
Forward
0 new messages