[IronPython] Windows Forms on Mac OS X

Michael Foord fuzzyman at voidspace.org.uk
Sat Jul 28 15:03:24 CEST 2007


Hello all,

Has anyone had any success getting Windows Forms to work with IronPython 
and Mono on Mac OS X?

Mono claims to support Windows Forms on Mac OS, but instantiating a form 
dies horribly (see below). I have the Apple X11 installed.

Some (old) Winforms bug reports suggested I might need to add references 
to the config file - but these are already in place in the current 
release of Mono.

Also - the bug on Mono where the backspace key doesn't work in the 
console (I realise this is the wrong place to complain about this) is 
really annoying. :-)

IronPython 1.1a1 (1.1) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
 >>> import clr
 >>> clr.AddReference('System.Windows.Forms')
 >>> from System.Windows.Forms import *
 >>> f = Form()
Traceback (most recent call last):
  File System.Windows.Forms, line unknown, in .cctor
  File System.Windows.Forms, line unknown, in GetInstance
  File System.Windows.Forms, line unknown, in .ctor
  File System.Windows.Forms, line unknown, in SetDisplay
  File System.Windows.Forms, line unknown, in .ctor
  File System.Windows.Forms, line unknown, in .ctor
  File System.Windows.Forms, line unknown, in .ctor
  File System.Windows.Forms, line unknown, in .ctor
  File System.Windows.Forms, line unknown, in InternalSizeFromClientSize
  File System.Windows.Forms, line unknown, in get_CreateParams
SystemError: An exception was thrown by the type initializer for 
System.Windows.Forms.XplatUI
 >>>

All the best,

Michael Foord
http://www.ironpython.info



More information about the Ironpython-users mailing list