New to wxPython: my Simple Counter program doesn't work

Thank you Tim, it works fine.

I'll have to play more with those two statements in order to understand what's going on:

   app = MyApp(1)
   app.MainLoop()

For example, if "everything" goes on in 'MainLoop()',
I guess it is into 'MyApp.OnInit' that I should insert the code
I want executed _before_ 'MainLoop()'.

But then, I won't be able to display anything in my frame since
'MainLoop()' has not been caleed yet...

Kinda Catch22 for me.

Richard Nault

Richard Nault wrote:

For example, if "everything" goes on in 'MainLoop()',
I guess it is into 'MyApp.OnInit' that I should insert the code
I want executed _before_ 'MainLoop()'.

But then, I won't be able to display anything in my frame since
'MainLoop()' has not been caleed yet...

What is it you want to do before MainLoop? If it invololves displaying
stuff on the frame, it can probably be done in the Frame __init__.

Usually, when you start to get stuck like this with a new framework,
it's best to ask your question by telling us what you want to do, and we
can suggest how to do it, rather then telling us how you wopuld do it in
a different framework.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov