Re: [Vala] Inheritance from Gtk.TextTag



Jörn,
trick with Object works. I had to additionally specify
GLib.Object(name:"name"); .

Thanks a lot!
Maciek

Dnia 2011-01-12, śro o godzinie 16:32 +0100, JM pisze: 
It could be possible like that:

class Myclass : Gtk.TextTag {
      public Myclass() {
              Object(name:"name");
      }
}


This compiles, but I didn't do any further testing. 
If it does not work, maybe wrapping Gtk.TestTag could also be a
workaround to achive what you want to do.
Regards
Jörn


Am Mittwoch, den 12.01.2011, 15:08 +0100 schrieb Maciej Rumianowski:
Hi,

I don't know how to correctly extend Gtk.TextTag class. I know that
extending a non-vala class i a little bit different.
So the problem is that i want to construct a subclass of Gtk.TextTag
with a name property, but
1. I cannot chain up to the non default constructor
2. I cannot access name property in the subclass, because it it defined
as "public string name { construct; owned get; }", and valac suggest to
chain up to constructor.

I am implementing a HtmlTextEditor in vala for shotwell, and i really
need help. I have emailed the Idea with HtmlTextTag on gtk mailing list:
http://mail.gnome.org/archives/gtk-list/2010-December/msg00028.html

Thanks,
Maciek Rumianowski (rumianom)

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list







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