Re: [Vala] GLib.Menu subclass

2016-06-29 Thread Al Thomas
From: Chris Daley To: Ondrej Tuma Sent: Wednesday, 29 June 2016, 15:58 Subject: Re: [Vala] GLib.Menu subclass Indeed, it should have a more meaningful error. Don't forget to file a bug report! I have seen this behaviour with some

Re: [Vala] GLib.Menu subclass

2016-06-29 Thread Chris Daley
Indeed, it should have a more meaningful error. Don't forget to file a bug report! I have seen this behaviour with some other classes and I suspect it will become more and more common as GLib/GTK/Clutter move towards preferring composition over inheritance (and in certain cases enforcing it).

Re: [Vala] GLib.Menu subclass

2016-06-29 Thread Ondrej Tuma
V Wed, 29 Jun 2016 07:39:13 + Luc Chante napsáno: > Hi, > > https://developer.gnome.org/gio/stable/GMenu.html#GMenu.other_details > > I'm not sure that GLib.Menu made to be overridable. In python PyObject is possible. But if could not be, that should not be in Vala,

Re: [Vala] GLib.Menu subclass

2016-06-29 Thread Luc Chante
Hi, https://developer.gnome.org/gio/stable/GMenu.html#GMenu.other_details I'm not sure that GLib.Menu made to be overridable. You could decorate it : extend MenuModel, with a private property which is a Menu, and override every methods of MenuModel by calling the private property. private

[Vala] GLib.Menu subclass

2016-06-29 Thread Ondrej Tuma
Hi all, I try to create GLib.Menu subclass, but it fails. Here is code: public class MyMenu : Menu { public MyMenu(){ append ("Item label", "app.my-action"); } } And here is error: /home/mcbig/tmp-dev/vala/gmenu.vala.c:39:8: error: field ‘parent_instance’ has incomplete type