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

In the end I did like this:

public class FooRadioToolButton : Gtk.RadioToolButton {
    public FooRadioToolButton(SList? group,
                              string stock_id,
                              Gtk.Widget? popup_contents = null
        ) {
        if (group != null)
        this.stock_id = stock_id;

The stock_id assignment is a property assignment. I couldn't use property
assignment for the "group" property as Gtk.RadioToolButton has an
inconsistancy in the type of group for set_group(group) and for the group
property... gtk indeed has a lot of cleanup that needs to be done.

Thanks all for the help!

2010/1/2 Jiří Zárevúcky <zarevucky jiri gmail com>

Jan Hudec píše v So 02. 01. 2010 v 11:29 +0100:
On Fri, Jan 01, 2010 at 12:02:31 +0100, Jiří Zárevúcky wrote:

Unfortunately this isn't going to work, because
Gtk.RadioToolButton.from_stock, like all Gtk allocators (*_new
lacks class-method form (*_construct function), which is necessary for


Ah, sorry for misinformation. I didn't know this.

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