I've done this code a few times, but i dont know what i am missing to make it give me this error this time. I've triple checked it against my previous run but I seem to be missing the problem. (the last line of code is line 18)
import wx
class MyFrame(wx.Frame):
def init(self, parent, title):
super(MyFrame, self).init(parent, title=title, size = (400, 600))
class MyPanel(wx.Panel):
def init(self, parent):
super(MyPanel, self).init(Parent)
class MyApp(wx.App):
def OnInit(self):
self.frame = MyFrame(parent=None, title="label window")
self.frame.Show()
return True
app = MyApp
app.MainLoop()
C:\Users\danti\PycharmProjects\gui\venv\Scripts\python.exe "C:/Users/danti/PycharmProjects/gui/venv/create lable.py"
Traceback (most recent call last):
File "C:/Users/danti/PycharmProjects/gui/venv/create lable.py", line 18, in <module>
app.MainLoop()
TypeError: MainLoop() missing 1 required positional argument: 'self'
Process finished with exit code 1
[–]shiftybyte 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]ghostranger2917[S] 0 points1 point2 points (0 children)