Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Construct gobject field #20

Open
gavr123456789 opened this issue Sep 7, 2019 · 0 comments
Open

Construct gobject field #20

gavr123456789 opened this issue Sep 7, 2019 · 0 comments

Comments

@gavr123456789
Copy link

Problem:
image

Code:

public class Person : Object {

    /* Construction properties */
    public string name { get; construct; }
    public int age { get; construct set; }

    public Person(string name) {
        Object(name: name);
    }

    public Person.with_age(string name, int years) {
        Object(name: name, age: years);
    }

    construct {
        // do anything else
        stdout.printf("Welcome %s\n", this.name);
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant