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

Re: [Vala] panel_applet_construct not found.



On Thu, 2008-10-30 at 07:21 +0100, Jürg Billeter wrote:
> Hi Yu,
> 
> On Wed, 2008-10-29 at 19:05 -0400, Yu Feng wrote:
> > vala will try to call panel_applet_construct from my_applet_construct
> > which doesn't exist.
> > 
> > I had a short look into gtk+-2.0.vapi. There are a lot of such empty
> > parameter constructors which implies some difficult in subclassing
> > widgets.
> > Does a [CCode] tag need to be invented to handle the non-existing
> > Applet()s or should we remove them from all .vapi files if no _construct
> > exists?
> 
> There already is an attribute and vapigen automatically inserts it for
> generated bindings:
> 	[CCode (has_construct_function = false)]
> 

Good news, but it seems like the vapis shipped in 0.4.0 doesn't include
them; 

> > I don't quite like the name of _construct, since we already have a
> > 'construct' block in vala, which is mapped to GObject->constructor.
> 

> The C _construct function gets generated to support the new GObject
> construction scheme with constructor chain-up. As this is an alternative
> to the `construct' blocks, we should not need to worry about the name
> clash here.
> 
Sure. It just confused me for a few seconds when I was reading the .c
files.

> Jürg
> 



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