[Mono-dev] Patches for mono-winforms

Steven Boswell II ulatekh at yahoo.com
Sat Jun 2 16:35:56 UTC 2012


Thanks for pushing one of my patches!

I'm looking into writing unit tests for my patches now.  It doesn't seem very difficult.  I'll start with DataGridView.SelectionChanged, and see how creative I can get with the rest of them.

Steven Boswell


________________________________
 From: Stifu <stifu at free.fr>
To: mono-devel-list at lists.ximian.com 
Sent: Saturday, June 2, 2012 8:45 AM
Subject: Re: [Mono-dev] Patches for mono-winforms
 
Alright. Patch 6 has been pushed
(https://github.com/mono/mono/commit/3d04a14a278d6160e33c16b52b86d68fe45d80b1).

I'll take care of the rest later, when I feel less lazy. :)
About patch 1, if there are indeed 2 separate issues, then it's better to
split the patch in 2, and also include 2 unit tests if possible.

Thanks.


Steven Boswell II wrote
> 
> Patch 1 is for https://bugzilla.xamarin.com/show_bug.cgi?id=5419 .
> Patch 2 is for https://bugzilla.xamarin.com/show_bug.cgi?id=5420 .
> Patch 3 is for https://bugzilla.xamarin.com/show_bug.cgi?id=3415 .
> I attached the relevant patch to all three of those bug reports.
> Patch 6 is
> for https://bugzilla.novell.com/show_bug.cgi?id=567331 and https://bugzilla.novell.com/show_bug.cgi?id=668012 .
>  I would post my patches to those bug reports, but Novell wants WAY too
> much personal information just to reply to a bug report.
> I don't see reports for the other bugs.
> 
> I'll go read about NUnit now.
> 
> Thanks for reviewing my bug fixes!
> 
> Steven Boswell
> 
> 
> ________________________________
>  From: Stifu <stifu@>
> To: mono-devel-list at .ximian 
> Sent: Friday, June 1, 2012 4:33 PM
> Subject: Re: [Mono-dev] Patches for mono-winforms
>  
> You could just write tests for what's easy to test, and leave the rest.
> As a bonus, you could post links to related bug reports here, and attach
> patch + unit test (if any) in each of them. You don't need to bother with
> GitHub for now.
> 
> I'll have a look and review what I can.
> 
> Thanks.
> 
> 
> Steven Boswell II wrote
>> 
>> I reported a few of them in Bugzilla, but I wasn't sure if that database
>> got any attention, e.g. the DataGridView.SelectionRows bug wasreported
>> months ago and go no reply.  I don't currently have an account on GitHub;
>> if I absolutely must have one, I'll go make one, but I wasn't planning to
>> do that unless I started making tons of changes or something.  Also, how
>> does one write a unit test for something that has to be verified visually
>> (e.g. fixing ToolStripItem.BackColor) or via user interaction (e.g.
>> fixing
>> DataGridView.SelectionRows)?  So I suppose, yes, I need help :-)
>> 
>> Steven Boswell
>> 
>> 
>> 
>> ________________________________
>>  From: Stifu <stifu@>
>> To: mono-devel-list at .ximian 
>> Sent: Thursday, May 31, 2012 11:06 PM
>> Subject: Re: [Mono-dev] Patches for mono-winforms
>>  
>> Hello,
>> 
>> Thanks for your work.
>> 
>> If I'm not mistaken, you reported each of these bugs, right? At least I
>> could find the two first ones in bugzilla, but didn't go further. Anyway,
>> I
>> suggest you make pull requests for each bug separately, specifying the
>> bug
>> number. Also, please include unit tests with each patch, highlighting
>> what
>> was fixed. I know it's more work, but it will make commiters more
>> confident
>> with your changes, and will guarantee no one will ever break these parts
>> again.
>> 
>> Let me know if you need help.
>> 
>> 
>> Steven Boswell II wrote
>>> 
>>> I work in a shop where our apps are written with C# and WinForms.  Thank
>>> God for Mono; I'm allowed to do all my work under Linux with Mono, and
>>> my
>>> code works fine under MS Windows and .NET.
>>> 
>>> Recently, I ran into a showstopper bug in mono-winforms, and finally
>>> decided to look through the code.  I fixed the bug quickly.  That led me
>>> to looking for the source of other, non-showstopper bugs I've
>>> encountered,
>>> and those went quickly too.  Enclosed is an archive with all of the bug
>>> fixes I made, which were made against the latest version on GitHub.  (I
>>> originally made these bug fixes against version 2.10.5, the most recent
>>> one in Fedora Core 16's yum repos.)
>>> 
>>> Patch 1 implements the EditingControlShowing event in DataGridView.
>>>  Before, it wasn't called at all.  I had to split a
>>> DataGridViewCell.StyleEditingControl() method off of
>>> DataGridViewCell.InitializeEditingControl(); under .NET, ComboBox.Items
>>> is
>>> initialized before EditingControlShowing is posted, and this split was
>>> necessary to get Mono to work that way too.  Styles modified in the
>>> EditingControlShowing event are now applied to text-box and checkbox
>>> controls too, not just combo-boxes.
>>> 
>>> Patch 2 resolves different behavior between .NET and Mono when the user
>>> leaves a DataGridView.  Under .NET, the last-edited cell is committed;
>>> under Mono, changed made to the last-edited cell are lost.  It was a
>>> one-line fix.
>>> 
>>> Patch 3 fires the DataGridView.SelectionChanged event when the selected
>>> rows/columns changes.  Before, the values of the SelectedRows and
>>> SelectedColumns properties were semi-random during the SelectionChanged
>>> event; now they're accurate.
>>> 
>>> Patches 4 and 5 fix two different exception-throws I encountered when
>>> ComboBox.Items.Remove() is called with an item that's not in the combo
>>> box.  .NET doesn't throw any exceptions in this case.
>>> 
>>> Patch 6 fixes the implementation of BackColor on ToolStripItem objects.
>>>  Now it behaves like it does under .NET, i.e. the BackColor setting on
>>> menu items etc. shows up.
>>> 
>>> I would very much appreciate it if you would consider committing these
>>> changes.  My MS-Windows-oriented co-workers were impressed by how
>>> quickly
>>> bugs in Mono can be found and fixed.  Who knows, maybe I'll get some
>>> converts to open-source.  (It amazes me that this sort of thing still
>>> has
>>> to be evangelized...sigh.)
>>> 
>>> Steven Boswell
>>> 
>>> _______________________________________________
>>> 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-tp4649620p4649621.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-tp4649620p4649644.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-tp4649620p4649654.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120602/4240739d/attachment.html>


More information about the Mono-devel-list mailing list