exit app with splashscreen not working

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

exit app with splashscreen not working

Neil Thornock
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!

--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

splashtest.py (1000 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: exit app with splashscreen not working

Scott Talbert
On Tue, 21 Jun 2016, Neil Thornock wrote:

> 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!

Your code works fine for me (once I supplied a bitmap).

Are you using Classic or Phoenix?  What OS and toolkit?
Reply | Threaded
Open this post in threaded view
|

Re: exit app with splashscreen not working

Neil Thornock
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.

On Tue, Jun 21, 2016 at 6:12 PM, Scott Talbert <[hidden email]> wrote:
On Tue, 21 Jun 2016, Neil Thornock wrote:

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!

Your code works fine for me (once I supplied a bitmap).

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

--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

splashtest.py (1K) Download Attachment