Re: [Vala] How to subclass a Gtk.Label?

2008-10-30 Thread lariamat
"text" should be completely hidden because we have the "set_text"/"get_text" in parallel with the "set_markup". Btw, shouldn't a construction-method with a string as parameter work for the derrived class like for a Gtk.Label? It doesn't. using Gtk; public class MyLabel : Label { } static int ma

Re: [Vala] How to subclass a Gtk.Label?

2008-10-30 Thread Thijs Vermeir
Hi On Thu, Oct 30, 2008 at 3:22 PM, Luca Dionisi <[EMAIL PROTECTED]> wrote: > On Thu, Oct 30, 2008 at 3:15 PM, Thijs Vermeir <[EMAIL PROTECTED]> wrote: >> use should not use text directly but use the set_text function, (like >> you would do in C) > > Then vapi file should declare "text" as a read-

Re: [Vala] How to subclass a Gtk.Label?

2008-10-30 Thread Frederik
Thijs Vermeir wrote: use should not use text directly but use the set_text function, (like you would do in C) Than it works. Thanks, it worked! Frederik ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] How to subclass a Gtk.Label?

2008-10-30 Thread Luca Dionisi
On Thu, Oct 30, 2008 at 3:15 PM, Thijs Vermeir <[EMAIL PROTECTED]> wrote: > use should not use text directly but use the set_text function, (like > you would do in C) Then vapi file should declare "text" as a read-only property. Right? ___ Vala-list mail

Re: [Vala] How to subclass a Gtk.Label?

2008-10-30 Thread Thijs Vermeir
Hi, On Thu, Oct 30, 2008 at 2:49 PM, Frederik <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to subclass a Label, but the program will crash: > > - > using Gtk; > > public class MyLabel : Label { > >public MyLabel () { >

[Vala] How to subclass a Gtk.Label?

2008-10-30 Thread Frederik
Hi, I tried to subclass a Label, but the program will crash: - using Gtk; public class MyLabel : Label { public MyLabel () { this.text = "Subclassed Label"; } } static int main (string[] args) { Gt