Could you please help me to find the problem? Python code that works:
class ParamWindow:
def __init__(self, b):
self.a = b
print self.a
params = ParamWindow(8)
print params.a
this prints 8 and 8. Ok. Then I do:
class ParamWindow:
def __init__(self, parent, b):
self = wx.Frame(parent = parent, id=-1, title="Parameters")
self.a = b
print self.a
params = ParamWindow(None, 8)
print params.a
and it says "ParamWindow instance has no attribute 'a'". Why has not it? I told him that self is Frame and then added a field "a" (no error at this point) but when i ask to print it (error at print line), it forgets that "a" exists... Where am I wrong? Thanks.