[Mono-list] Winform on OSX

Glenn Martin lifewarped at yahoo.com
Sun Jun 24 22:00:40 EDT 2007


I didnt check out the tutorial but, Looks to me like the Mono App is
loooking for the X11 DISPLAY variable. This is assigned once X11.app is
open. So try this, Open X11 then the Application. If that doesnt work,
drop in to the X11 Terminal and try to use the open command to run the
app... If either of these methods work, i can instruct you further (show
you how to make this happen without YOUR interaction) from there.

Glenn R. Martin
MacUX Development
www.technicalstressings.com
www.macux.org
www.xargos.com

Charles Rilhac wrote:
> Hi,
> I followed this
> tutorial http://www.cocoasharp.org/cocoaSharp/default.aspx/CocoaSharp/WinFormsTutorial.html
> I did exactly similar but i use OSX 10.4 Intel and Mono 1.2 and X11
> So i did all the step after when execute the .app there is nothing, or
> when execute "mono test.exe" i have this error:
> /Macbook:~ saperlipopette$ mono test.exe/
> /
> /
> /Unhandled Exception: System.TypeInitializationException: An exception
> was thrown by the type initializer for System.Windows.Forms.XplatUI --->
> System.ArgumentNullException: Could not open display (X-Server required.
> Check you DISPLAY environment variable)/
> /Parameter name: Display/
> /  at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle)
> [0x00000] /
> /  at System.Windows.Forms.XplatUIX11..ctor () [0x00000] /
> /  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] /
> /  at System.Windows.Forms.XplatUI..cctor () [0x00000] --- End of inner
> exception stack trace ---/
> /
> /
> /  at <0x00000> <unknown method>/
> /  at System.Windows.Forms.Form.get_CreateParams () [0x00000] /
> /  at System.Windows.Forms.MessageBox+MessageBoxForm.get_CreateParams ()
> [0x00000] /
> /  at System.Windows.Forms.Control.InternalSizeFromClientSize (Size
> clientSize) [0x00000] /
> /  at System.Windows.Forms.Control..ctor () [0x00000] /
> /  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] /
> /  at System.Windows.Forms.ContainerControl..ctor () [0x00000] /
> /  at System.Windows.Forms.Form..ctor () [0x00000] /
> /  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window
> owner, System.String text, System.String caption, MessageBoxButtons
> buttons, MessageBoxIcon icon, Boolean displayHelpButton) [0x00000] /
> /  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window
> owner, System.String text, System.String caption, MessageBoxButtons
> buttons, MessageBoxIcon icon) [0x00000] /
> /  at (wrapper remoting-invoke-with-check) MessageBoxForm:.ctor
> (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)/
> /  at System.Windows.Forms.MessageBox.Show (System.String text) [0x00000] /
> /  at test.Main () [0x00000] /
> /
> /
> /** ERROR **: file mini.c: line 8762 (mono_get_lmf_addr): should not be
> reached/
> /aborting.../
> /Stacktrace:/
> /
> /
> /
> /
> /** (process:1649): ERROR (recursed) **: file mini.c: line 8746
> (mono_get_lmf): should not be reached/
> /aborting.../
> /Abort trap/
> /
> /
> Thank you for your help :)
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4510 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20070624/68142898/attachment.bin 


More information about the Mono-list mailing list