Hello,
After looking at some OOP examples of GTK Vala applications I have noticed they are calling Object() inside a class constructor. What is the purpose of this?
namespace MyApp {
public class Window : Gtk.ApplicationWindow {
public Window (Application app) {
Object (
application: app
);
}
construct {
title = "This is my new GTK app";
window_position = Gtk.WindowPosition.CENTER;
set_default_size(350, 80);
show_all();
}
}
}
Looking at the Valadocs for the ApplicationWindow creation methods it requires an instance of an application.
public ApplicationWindow (Application application)
So what is the call to Object doing here in the class constructor?
Thanks.