[Gtk-sharp-list] properties & setters
Mike Kestner
mkestner@speakeasy.net
20 Feb 2003 21:42:30 -0600
On Thu, 2003-02-20 at 19:47, Lee Mallabone wrote:
> For example, Gtk.Arrow has full property members for its ArrowType and
> ShadowType parameters.
>
> However, it also has a method with this signature:
> Set(ArrowType, ShadowType);
>
> Personally, I'd be tempted to try and remove the Set() method, to get
> rid of any ambiguity for API users about which one to use. I also think
> properties are more elegant.
We already turn getters and setters into properties wherever they follow
the following forms:
GtkFoo gtk_bar_get_foo (GtkBar);
void gtk_bar_set_foo (GtkBar, GtkFoo);
We even suppress the GObject properies in preference for the
getter/setter if it is available.
In this case, it would probably be best to just hide the Arrow.Set
method. It would be a PITA to try to use that method to set two property
values.
I committed a metadata change to hide the Set method.
--
Mike Kestner <mkestner@speakeasy.net>