[Python.NET] Problems with subclasses...

Markus Schumacher markus.schumacher at gmx.de
Fri May 26 16:28:44 CEST 2006


Hi list,

Sorry if this is posted twice, however I didn't see this message on the
list. Maybe the company mailserver hasn't delievered it :(

I got a problem here. I have the a class in .NET1.1 (Class A) with
the method public virtual void Do() for example.
Another .NET class (say Class B) has a collection of Class A and a
method DoAll() which iterates over all
Class A in B and calls the Do() Method.
So now comes the problem. In Python I have a class MyA derived from
.NET Class A and overrides the method Do().

Now I add some of my MyA class to the B class and execute DoAll() on
B. Surprisingly, only the Do() methods of A are called not the
PythonNet Do() in the MyA instances.

I would have expected that the MyA.Do() will be called. Is this a bug?
I'm using the RC2 of PythonNet for .NET1.1 and Python2.4.2.

Any ideas?

Markus



More information about the PythonDotNet mailing list