[Mono-winforms-list] SetSystemColors regression ?

Kornél Pál kornelpal at gmail.com
Sun Apr 29 06:57:45 EDT 2007


> There appears to be a regression in SetSystemColors.
>
> The KnownColors.Update method has the following signature:
> public static void Update (int knownColor, uint color)
>
> However in Theme.SetSystemColors, we're passing in two int's:
> update.Invoke (null, new object [2] { (int) kc, value.ToArgb () });
>
> This results in an ArgumentException (thrown by MonoMethod.Invoke).

This is a bug indeed.

I suggest the following fix:
public static void Update (int knownColor, int color)
{
 ArgbValues [knownColor] = unchecked ((uint) color);
}

This would preserve compatibility with older MWF releases as well.

Kornél 



More information about the Mono-winforms-list mailing list