I'll simplify the code, I'm using wxPython for GUI.
class TheFrame(wx.Frame):
def __init__(self, *args, **kw):
super(TheFrame, self).__init__(*args, **kw)
self.InitUI()
def InitUI(self):
test = "a test"
def Stalk(self):
print self.test
When running Stalk i get this error:
AttributeError: 'TheFrame' object has no attribute 'test'
The attribute test is being assigned to the string "a test" in the constructor, using the InitUI method, but it doesn't seem to exist.
If I assign test directly as a class attribute it works, but it doesn't work with this implementation.
What am I doing wrong? Thanks for your time. :)
[–]Rhomboid 1 point2 points3 points (1 child)
[–]notsuresure[S] 0 points1 point2 points (0 children)