Re: [Vala] How to chain up to parent constructor



Jan Hudec wrote:
However, for all Gtk objects it is allowed to chain up directly to
GLib.Object, passing parameters as construct properties. So you need to chain
up like (I am not really sure the syntax is correct, though):

public class FooRadioToolButton : Gtk.RadioToolButton {
      public FooRadioToolButton.from_stock (SList<Gtk.Widget> list,
                                              string stock) {
              Object ("group", list, "stock-id", stock);
      }

The correct syntax is:

        Object (group: list, stock_id: stock);


Best regards,

Frederik



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]