Page 1 of 1

Running class code from demo collection is failing.

Posted: Thu Dec 05, 2019 10:01 pm
by leifhyrne
I started using the demo code from

Code: Select all

import wx
import wx.dataview as dv
    
class ExMain(wx.Frame):


    cnx = None
    index = 0

    def __init__(self):

        wx.Frame.__init__(self, wx.ID_ANY, "Title", wx.DefaultPosition, (400,400), wx.DEFAULT_FRAME_STYLE, "Simulator Main")

if __name__ == '__main__':
    app = wx.App()
    frame = NRTSimMain().Show()
    app.MainLoop()

This code produces the following errors:


frame = NRTSimMain().Show()
File ".\NRTSim-Main.py", line 13, in __init__
wx.Frame.__init__(self, wx.ID_ANY, "Title", wx.DefaultPosition, (350,200), wx.DEFAULT_FRAME_STYLE, "NRT Sorter Sim Main")
TypeError: Frame(): arguments did not match any overloaded call:
overload 1: too many arguments
overload 2: argument 1 has unexpected type 'StandardID'

Don't understand what is going on. I'm trying to get a basic (and I mean minimal) for going so I can start adding the listCtrl stuff...

Re: Running class code from demo collection is failing.

Posted: Thu Dec 05, 2019 10:40 pm
by doublemax
The people from wxPython are probably better suited to help. https://discuss.wxpython.org/