[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Accessing in a child class the attribute of a parent class
- From: Tomas Guisasola Gorham <tomas@...>
- Date: Wed, 5 Jan 2011 21:43:43 -0200 (BRST)
Hi Luciano
The line 08 should be replaced from "class.child()", a simple class, to
"class.child(parent)", subclass inheriting attributes and methods of
"parent".
But, despite this mistake, the problem related in the previous message is
still occuring with the same exact diagnosis!
I noticed the mistake and changed the code as you mentioned above.
Then I renamed the __init methods to __user_init, but in both versions
the problem still occurs. I can't understand why, but classlib is
calling child:__init (or __user_init) before calling parent:__init (or
__user_init). Worst, it is calling the functions with different values
of self, thus the attributes are initialized in different objects :-(
I think you have to study classlib to understand how it should
be used.
Regards,
Tomás