[Mono-winforms-list] Some basic questions on Winforms.

Peter Dennis Bartok peter@novonyx.com
Wed, 13 Apr 2005 11:54:45 -0600


I'm not directly answering your question, Jordi is working on that, but I 
wanted to make sure that you are aware that you are using the X11 driver on 
your mac, due to the way you are starting your application? You cannot run 
SWF applications via 'mono <executable>', unless you are intentionally 
trying to use X11 on the Mac.

This message (and the whole thread) explains this, and also points out a 
problem with the 1.1.6 package (unless you're on a G3 you should use 1.1.5 
for now, 1.1.6 is missing something, if you're on a G3 use 1.1.6-4).
http://lists.ximian.com/archives/public/mono-winforms-list/2005-April/001582.html

However, the Mac driver is ALPHA, and does not support menus yet.

Cheers,
  Peter

-----Original Message-----
From: "Wei Weng" <wweng@kencast.com>
To: "Jordi Mas" <jordi@ximian.com>
Cc: <mono-winforms-list@ximian.com>
Date: 13 April, 2005 10:01
Subject: Re: [Mono-winforms-list] Some basic questions on Winforms.


>Jordi Mas wrote:
>>>2: How do I bind a shortcut key to an action/function without using the
>>>setting the shortcut key in MainMenu/ContextMenu? (Can not set menu in my
>>>current mono setup either. Always complains about set_Menu method, 
>>>throwing
>>>a NullReferenceException)
>>
>>
>> Hello Wei,
>>
>> Can you provide a small sample that reproduces this problem?
>>
>> Thanks!
>>
>
>I have attached the small sample to this email. The environment is mono
>1.1.6, OSX 10.3. I could mono the same program on fedora 2, however, the
>menu never really showed.
>
>
>The error message I got is:
>
>[wweng@NEWTON TestMono]$ mono Test.exe
>Mono System.Windows.Forms Assembly [Revision: 41731; built: 2005/2/15 
>5:56:12]
>Keyboard: United States keyboard layout (phantom key version)
>
>Unhandled Exception: System.NullReferenceException: Object reference not 
>set to
>an instance of an object
>in <0x0007c> System.Windows.Forms.Form:set_Menu 
>(System.Windows.Forms.MainMenu)
>in <0x00084> (wrapper remoting-invoke-with-check) 
>System.Windows.Forms.Form:set_
>Menu (System.Windows.Forms.MainMenu)
>in <0x000d8> Form1:InitializeComponent ()
>in <0x0006c> (wrapper remoting-invoke-with-check) Form1:InitializeComponent 
>()
>in <0x00024> Form1:.ctor ()
>in <0x00048> (wrapper remoting-invoke-with-check) Form1:.ctor ()
>in <0x0002c> Form1:Main ()
>
>