[Mono-osx] winforms tutorial

Adhamh Findlay monoosx@adhamh.com
Wed, 13 Apr 2005 22:17:25 -0700


I updated the tutorial with the following text:

Also be sure that you have these files with the below content. If you 
don't you will get a "System.TypeInitializationException" when launching 
the application. This is a bug with the Mono package.

/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/System.Drawing/1.0.5000.0__b03f5f7f11d50a3a/System.Drawing.dll.config

 <configuration>
        <dllmap dll="gdiplus.dll" 
target="/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib" 
/>
 </configuration>


/Library/Frameworks/Mono.framework/Versions/Curren/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config

 <configuration>
        <dllmap dll="gdiplus" 
target="/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib" 
/>
        <dllmap dll="libX11" target="/usr/X11R6/lib/libX11.dylib" />
 </configuration>



Brett Neumann wrote:

> I am also having problems running the winforms tutorial at the cocoa#  
> wiki.
> After compiling and macpacking, I double click the .app bundle in the  
> Finder, the application immediately crashes and leaves the following 
> in  the Console.app
>
> ##############
> Unhandled Exception: System.TypeInitializationException: An exception  
> was thrown by the type initializer for 
> System.Windows.Forms.ThemeEngine  ---> System.ArgumentException: 
> Invalid Parameter. A null reference or  invalid value was found.
> in <0x000a0> System.Drawing.GDIPlus:CheckStatus (System.Drawing.Status)
> in <0x000c4> System.Drawing.Font:.ctor  
> (System.Drawing.FontFamily,single,System.Drawing.FontStyle,System.Drawin 
> g.GraphicsUnit,byte,bool)
> in <0x00038> System.Drawing.Font:.ctor  
> (System.Drawing.FontFamily,single)
> in <0x00074> (wrapper remoting-invoke-with-check)  
> System.Drawing.Font:.ctor (System.Drawing.FontFamily,single)
> in <0x00234> System.Windows.Forms.ThemeWin32Classic:.ctor ()
> in <0x000b0> System.Windows.Forms.ThemeEngine:.cctor ()
> --- End of inner exception stack trace ---
>
> in (unmanaged) System.Windows.Forms.ThemeEngine:get_Current ()
> in <0x00010> System.Windows.Forms.Control:get_DefaultFont ()
> in <0x0000c> System.Windows.Forms.Control:get_DefaultFont ()
> in <0x000a8> System.Windows.Forms.Control:get_Font ()
> in <0x00074> MessageBoxForm:InitFormsSize ()
> in <0x0006c> (wrapper remoting-invoke-with-check)  
> MessageBoxForm:InitFormsSize ()
> in <0x00040> MessageBoxForm:RunDialog ()
> in <0x0006c> (wrapper remoting-invoke-with-check)  
> MessageBoxForm:RunDialog ()
> in <0x00068> System.Windows.Forms.MessageBox:Show (string)
> in <0x00014> test:Main ()
> ##################
>
> any ideas?
>
> Brett Neumann
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx