Having this basic example.
Define the “title” property:
protected string _title;
public string title {
get { return this._title; }
set {
this._title = value;
title_label.set_label(this._title);
}
}
Works correctly. You can set/get the property by doing
var y = <object>.title;
<object>.title = x;
But is there any way that I also generate get_() and set_property(…) functions?
var y = <object>.get_title();
<object>.set_title(x);
Maybe with some attribute. But I didn’t find a specific one in the list:
https://wiki.gnome.org/Projects/Vala/Manual/Attributes
Thanks!