Hello,

I'm trying to create custom actions by inheriting from GLib.Action, however,
the following code:

public class CloseProjectAction : Object, Action
{
    public bool enabled
    {
        get
        {
            return true;
        }
    }

    public bool get_enabled()
    {
        return true;
    }

    /* more method implementations... */
}

Results in the following error:

CloseProjectAction.c:146:17: error: redefinition of 
‘close_project_action_real_get_enabled’
 static gboolean close_project_action_real_get_enabled (GAction* base) {
                 ^
CloseProjectAction.c:71:17: note: previous definition of 
‘close_project_action_real_get_enabled’ was here
 static gboolean close_project_action_real_get_enabled (GAction* base) {
                 ^
There are similar errors for every property and corresponding get method in the 
derived class. There are indeed two functions of the same name in the .c 
output, functionally equivalent. Removing either the property or the method 
generates a different set compile errors:

CloseProjectAction.vala:3.1-3.48: error: `CloseProjectAction' does not 
implement interface method `GLib.Action.get_enabled'

Is there a mechanism I can get inheritance from GLib.Action to work?

Cheers,
Ed
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to