[Mono-dev] Patches for mono-winforms

Stifu stifu at free.fr
Sun Jun 17 20:24:32 UTC 2012


Hah. To run the application with Mono on Windows, you should use the Mono
command prompt, and run the application using the "mono myapp.exe" command.
The default window icon is different, which will confirm the application is
run with Mono.
For what it's worth, P/Invokes should work with Mono on Windows. So if you
have to use P/Invokes, maybe you shouldn't check with framework the
application is running on, but which OS you're on.

"And re: getting bug fixes accepted, and WinForms not being a priority for
the Mono project...what about the bug fix for GetFileSystemEntries() I
posted a week ago?  That's not WinForms, and I haven't heard a peep about
it."

I don't know. I'm not on the Mono team, and only deal with WinForms.


Steven Boswell II wrote
> 
> Well...it seems the problem is that selecting "Mono / .NET 3.5" versus
> ".NET Framework 3.5 Client Profile" in MonoDevelop's
> Options->Build->General pane doesn't seem to change the DLLs that get
> loaded at runtime.  It looks like I've been running with .NET either way.
>  Is there something else I'm supposed to do under MS Windows to run with
> Mono instead of .NET?  I ran an installer called
> "mono-2.10.8-gtksharp-2.12.11-win32-1" to install Mono under MS Windows.
>  Is there anything else I need to install?
> 
> Here's a random idea...enclosed is another version of the test project.
>  It's just like the last one, except that, in addition to testing for
> whether it's running on MS Windows before doing the god-awful P/Invoke
> version of faking a mouse click, it also tests "Type.GetType
> ("Mono.Runtime") == null", to make sure it's .NET running and not Mono.
>  While I wait for someone to tell me what I'm doing wrong under MS
> Windows, see if this gets the test to run for you.
> 
> And re: getting bug fixes accepted, and WinForms not being a priority for
> the Mono project...what about the bug fix for GetFileSystemEntries() I
> posted a week ago?  That's not WinForms, and I haven't heard a peep about
> it.
> 
> Steven Boswell
> 
> 
> ________________________________
>  From: Steven Boswell II <ulatekh@>
> To: "mono-devel-list at .ximian" <mono-devel-list at .ximian> 
> Sent: Saturday, June 16, 2012 5:52 PM
> Subject: Re: [Mono-dev] Patches for mono-winforms
>  
> 
> Thanks, Rob.  That's exactly what I expect would happen.  Only by building
> latest Mono, with the patch, will the project's test succeed with Mono.
> 
> Don't worry about stretching your patience -- the fact that you got it to
> succeed in .NET was plenty helpful.
> 
> Stifu..."whether I build it with .NET or Mono, I get the error I
> mentioned, running the application with Mono on Windows"...if you ran it
> with unpatched Mono, that's what I expect to happen.  If you ran it with
> patched Mono or with .NET, I wouldn't.  What exactly did you do?
> 
> Steven Boswell
> 
> 
> ________________________________
>  From: Rob Wilkens <robwilkens@>
> To: mono-devel-list at .ximian 
> Sent: Saturday, June 16, 2012 5:41 PM
> Subject: Re: [Mono-dev] Patches for mono-winforms
>  
> As per the test project mentioned, I just tested with Microsoft Visual
> Studio 2010 professional, on Windows 7, with Microsoft .NET (By clicking
> Debug->Start Debugging to run it), this does not raise any exceptions
> (no message box), it leaves me with an open window.  I also tested on
> Mono on Windows (version 2.10.8) and the test fails in mono, seemingly
> before a window is displayed on the screen.
> 
> Again, i know my opinion is of mixed value.
> 
> BTW - I did not try applying the patch in mono, i don't have the
> patience right now (unless you want me to) to build mono in windows.
> 
> -Rob
> 
> 
> 
> On 06/16/2012 06:39 PM, Stifu wrote:
>> I wasn't talking about the mailing list in particular, but any media
>> (bugzilla, Git...). My point was that getting that many patches pushed
>> within such a short time, for a part that is no longer maintained by the
>> Mono team, is pretty good. I'd have been
>  pretty happy if my patches received
>> that much attention a few years ago.
>>
>> Anyway, about patch 2, whether I build it with .NET or Mono, I get the
>> error
>> I mentioned, running the application with Mono on Windows. So unless this
>> is
>> an OS-specific issue, I don't know what's the problem. I'll try to check
>> it
>> out on Linux, whenever I can find some time. Meanwhile, if anyone wants
>> to
>> review the patch, feel free.
>>
>>
>> Steven Boswell II wrote
>>> Are you saying that there have been bug fixes submitted to this mailing
>>> list, that have sat around for YEARS without being acted upon by those
>>> with version-control-commit authority...?
>>>
>>> I installed latest mono to /usr/local, compiled my test with "gmcs
>>> -out:DgvTest.exe Program.cs -r:System -r:System.Windows.Forms -r
>>>
>  System.Drawing", and ran it with "mono DgvTest.exe", and it runs fine for
>>> me.  So I guess we're back to having an impasse.  Sigh.
>>>
>>> Steven Boswell
>>>
>>>
>>> ________________________________
>>>  From: Stifu <stifu@>
>>> To: mono-devel-list at .ximian 
>>> Sent: Saturday, June 16, 2012 1:09 AM
>>> Subject: Re: [Mono-dev] Patches for mono-winforms
>>>  
>>> Honestly, you've had it much better than the vast majority. :)
>>> Some others have been waiting for years. Also, now you can add NUnit to
>>> your
>>> resume. :p
>>>
>>> Anyway, I get a "1-1: expected not null, found null" message box in
>>> DgvTest4
>>> with Mono, even after applying your patch.
>>>
>>>
>>> Steven Boswell II wrote
>>>> I agree, but we both know how much toil
>  it takes to get our bug fixes
>>>> accepted and applied to the git repository on this mailing list... ;-)
>>>>
>>>>
>>>> ________________________________
>>>>   From: Rob Wilkens <robwilkens@>
>>>> To: mono-devel-list at .ximian 
>>>> Sent: Friday, June 15, 2012 5:42 PM
>>>> Subject: Re: [Mono-dev] Patches for mono-winforms
>>>>  
>>>>
>>>> I know my opinion is of mixed value, but it looks to make sense to me.. 
>>>> If the toolstripitem is being changed so it no longer has an owner,
>>>> calculating a size might not make sense....
>>>>
>>>> -Rob
>>>>
>>>> On 06/15/2012 08:34 PM, Steven Boswell II wrote: 
>>>> [... Digging through the stack trace, I arrived at
>>>> System.Windows.Forms.ToolStripItem.set_InternalOwner, where
>  the owner was
>>>> being set to null, and right afterwards, CalculateAutoSize() was being
>>>> called.  Why would anyone need to calculate the size of a menu-item
>>>> that
>>>> isn't even connected to a menu any more?  So, for me, the bug fix was
>>>> obvious: check if the owner isn't null before
>>>> calling CalculateAutoSize().
>>>>  That's what the enclosed patch does. ...]
>>>> _______________________________________________
>>>> Mono-devel-list mailing list
>>>> Mono-devel-list at .ximian
>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://mono.1490590.n4.nabble.com/Patches-for-mono-winforms-tp4649620p4649980.html
>>> Sent from
>  the Mono - Dev mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at .ximian
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at .ximian
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>
>>
>> --
>> View this message in context:
>> http://mono.1490590.n4.nabble.com/Patches-for-mono-winforms-tp4649620p4649989.html
>> Sent from the Mono - Dev mailing list archive at
>  Nabble.com.
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at .ximian
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at .ximian
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at .ximian
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at .ximian
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 


--
View this message in context: http://mono.1490590.n4.nabble.com/Patches-for-mono-winforms-tp4649620p4650020.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list