[IronPython] Problem Importing WinForms IPY2.0 B5

Davy Mitchell daftspaniel at gmail.com
Wed Oct 8 08:34:41 CEST 2008


Hi All,
Basic Repro is...

---------form.py-------
import clr
clr.AddReference('System.Windows.Forms')
from System.Windows.Forms import *
print len(dir(Form))
---------test.py--------
from forms import *
print len(dir(Form))

Output:
538
443

My real world case is a subclass of Form is in another module. The module
that uses it tries to do mainform.KeyDown += self.DoSomething and fails as
KeyDown has vanished.
Yet if you copy and paset the subclass Form code into the same file it
works!

Forgive me if I am missing something obvious in the import mechanism :-)

Thanks,
Davy Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081008/b57d2bc7/attachment.html>


More information about the Ironpython-users mailing list