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

2010-01-03 Thread Dov Grobgeld
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)

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

2010-01-02 Thread Jan Hudec
On Fri, Jan 01, 2010 at 12:02:31 +0100, Jiří Zárevúcky wrote: Dov Grobgeld píše v Pá 01. 01. 2010 v 12:13 +0200: How do you create a transparent inheritance? E.g. I would like to inherit from Gtk.RadioToolButton and support all its methods and constructors. But when creating the proxy

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

2010-01-02 Thread Frederik
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 {

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

2010-01-02 Thread Jiří Zárevúcky
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),

[Vala] How to chain up to parent constructor

2010-01-01 Thread Dov Grobgeld
How do you create a transparent inheritance? E.g. I would like to inherit from Gtk.RadioToolButton and support all its methods and constructors. But when creating the proxy class FooRadioToolButton below I get the error The name `from_stock' does not exist in the context of `FooRadioToolButton'

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

2010-01-01 Thread Jiří Zárevúcky
Dov Grobgeld píše v Pá 01. 01. 2010 v 12:13 +0200: How do you create a transparent inheritance? E.g. I would like to inherit from Gtk.RadioToolButton and support all its methods and constructors. But when creating the proxy class FooRadioToolButton below I get the error The name `from_stock'