[Vala] panel_applet_construct not found.



I updated to vala 0.4.0 for my panel applet, and receive this error.


It seems to be related to the new chaining _new functions.
whenever the vapi file has something like
namespace Panel {
class Applet: Gtk.EventBox{
        public Applet();
}
}
and I subclass it

class MyApplet:Applet {
   public MyApplet() {

}
}

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?

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


Yu




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