[Mono-winforms-list] RE RE: TabControl.cs Patch

Andreia Gaita shana.ufie at gmail.com
Sun Apr 29 13:06:36 EDT 2007


On 4/29/07, berni x <mitterau at web.de> wrote:
> the behavor of MS is to throw a argumentnullException if the referenz of TabPage is null.
> If the TabPage is not found or it is the last tab a
> Argumentoutofrangeexception is thrown
>
> according to MSDN: http://msdn2.microsoft.com/en-us/library/xck4eb8y(VS.80).aspx

Hey there!

First off, thank you for the patches. It's great to have people
contributing :) We got a bit on each other's toes here, the methods on
the patch you sent are already on svn. I only saw your patches
afterwards :p

Anyway, about that argumentoutofrangeexception, there's no need to
throw it from the methods, as it is thrown when SelectIndex is set.
Also, some missing methods on TabPageCollection help out these
methods, so most the lookup code ends up in the tabpagecollection
instead. Check out what's now on svn to see what I mean.

On a more general note, all patches should include relevant unit tests
to test the behaviour introduced by them - check out TabControlTest on
MWF/Test to see how this works. And also, all code should be tested on
ms.net too - though the MSDN docs are good, sometimes they don't
exactly reflect the actual behaviour, and the actual behaviour is more
important than what MSDN says.

Sorry again for this, I hope you don't get discouraged, there's still
plenty to do in the winforms world.

andreia


More information about the Mono-winforms-list mailing list