
class Demo.Notify : Object {
    
    public int testint { get; set; default = 0; }
    public uint16 testuint { get; set; default = 0; }
    public uint16 testuint16 { get; set; default = 0; }
    public string teststring { get; set; default = "string"; }
    
    public static int main(string[] args) {
        var demo = new Demo.Notify();
        demo.run();
        return 0;
    }
    
    public void run() {
        notify["testint"].connect(on_int_changed);
        notify["testuint"].connect(on_uint_changed);
        notify["testuint16"].connect(on_uint16_changed);
        notify["teststring"].connect(on_string_changed);
        
        testint = 23;
        testuint = 23;
        testuint16 = 23;
        teststring = "twenty three";
    }
    
    public void on_int_changed() {
        stdout.printf("int changed\n");
    }
    
    public void on_uint_changed() {
        stdout.printf("uint changed\n");
    }
    
    public void on_uint16_changed() {
        stdout.printf("uint16 changed\n");
    }
    
    public void on_string_changed() {
        stdout.printf("string changed\n");
    }
}


