[Gtk-sharp-list] Restoring default Gdk.Color for widgets

Mike Kestner mkestner@speakeasy.net
Wed, 24 Dec 2003 12:00:53 -0600


On Sun, 2003-12-21 at 13:42, Leo Spalteholz wrote:

> But when I try this:
> myWidget.ModifyBg(StateType.Active, null);
> I get the following compilation error:
> Common.cs(49) error CS1503: Argument 1: Cannot convert from 'object' to 
> 'Gdk.Color'
> 
> Any ideas on how to restore the default widget color are appreciated.

There's a few layered bugs working against you here.  I think the best
way to handle this would be to pass Gdk.Color.Zero to the parameter.
But...

1. The parameter needs to be marked null_ok for that method.
2. The generator needs to handle null_ok parameters for Value types.
3. #2 will probably require generation of Equals, GetHashCode, ==, and
!= for all Value types.

Can you open some bugs for these so they get on the list?

Thanks,
-- 
Mike Kestner <mkestner@speakeasy.net>