[IronPython] Running applications vs. forms?

jeff sacksteder jsacksteder at gmail.com
Sat Jun 17 22:33:49 CEST 2006


To clarify my earlier message-

If I want to create a non-trivial application, I will have several forms and
dialogs. My(apparently broken) understanding is that I would create a class
representing the application and pass that to the Application.Run(method).
For example, the tiny app here:


import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')

from System.Windows.Forms import Form,Application

class Form1(Form):
    pass
class Form2(Form):
    pass
class MyApp(Application):
    pass
a = MyApp()
Application.Run(a)


Produces 'TypeError: cannot derive from sealed or value types'.
Alternatively, If I create a class with no inheritance, I get 'TypeError:
bad args for method'. What is the correct way to do this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060617/65d6db48/attachment.html>


More information about the Ironpython-users mailing list