[Mono-dev] Patches for mono-winforms

Stifu stifu at free.fr
Fri Jun 1 06:06:18 UTC 2012


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.


More information about the Mono-devel-list mailing list