Hello,

On Feb 1, 2009, at 10:42 PM, Bryan Smith wrote:

Hi Everyone,

I am trying out a simple wx program from a book and anytime I try and run the code, the wxFrame flashes open and closes immediately. This is frustrating as the code is essentially the same as in the book. Here is the code for your viewing pleasure:

import wx

class wxTest():

    def __init__(self):
        mainApp = wx.App()

        mainFrame = wx.Frame(None)
        mainButton = wx.Button(mainFrame)
        mainFrame.show()


Should be mainFrame.Show() <- UPPER case S.

To see the traceback of errors you should create the app object with wx.App(False) to disable redirection of output, so tracebacks will be printed to the console.


Cody

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to