[Vala] Gtk.RecentFilterInfo and some interface issues.



Hi:

I have two issues right now coding in vala:

First:
I'm using Gtk.RecentFilterInfo, and i got this:

Gtk.RecentFilterInfo a = new Gtk.RecentFilterInfo();
error: 'Gtk.RecentFilterInfo' does not have a default constructor

and my question is how to instantiate that. Now I've found that in Gtk c code GtkRecentFilterInfo is just a struct, and in gtk+-2.0.vapi is declared as a class (annotated with Compact modifier). Could this be a bug ?
If it is not, please show me how to use it.
(BTW, when I manager to hack the compiler using GLib.Object.new(typeof(Gtk.RecentFilterInfo)) then gcc give me an error when looking for gtk_recent_filter_info_free() ("undefined reference") and that's logical cause there's no such a function in Gtk library.

Second:
In Gtk.RecentChooser interface there are properties: i.e.: limit not declared abstract, and I suppose i don't have to instantiate those in my class (which is implementing the interface), but when I'm using that property I'm getting warning from GLib that myClass doesn't have the property. Note: Vala compiles just fine, but when running is when I'm getting the error.

It would be useful to update a little the examples from http://live.gnome.org/Vala/Documentation, or make the properties explanation more clear. Is it always needed to use backend attributes of the classes for every declared properties ? How I refer to the properties inside the class, with the property name or the backend attribute ?


Thxs




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]