Re: [Vala] How to chain up to parent constructor
- From: Dov Grobgeld <dov grobgeld gmail com>
- To: Jiří Zárevúcky <zarevucky jiri gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] How to chain up to parent constructor
- Date: Sun, 3 Jan 2010 21:53:09 +0200
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.set_group(group);
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!
Dov
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
functions),
lacks class-method form (*_construct function), which is necessary for
the
chain-up.
[...]
Ah, sorry for misinformation. I didn't know this.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]