Hi,
I have got a question while reading article Subclassing in Programming
Guide. In some cases, libavg forgets the class of a derived node and
returns an object of the base class. Like this:
>>> textRect = TextRect("foo", size=(100,100))
>>> print type(textRect)
<class 'subclass.TextRect'>
>>> print type(textRect.rect.getParent())
<class 'libavg.avg.DivNode'>
One of the provided solution in this article is to Keep a reference to the
derived node around in python. What does it mean by saying "Keep a
reference to"? Because after several times' trying, I still couldn't do it
right, maybe it is because I am new to python and failed to get the basic
idea of this sentence. Can anyone help and explain more about it?
Thank you very much!
--
Ira
_______________________________________________
libavg-users mailing list
[email protected]
https://mail.datenhain.de/mailman/listinfo/libavg-users