Gtk.TextBuffer has a property:
public weak string text { set; get; }
This should mean you can either use:
my_text_buffer.text = "foo";
Or:
my_text_buffer.set_text ("foo");
Right? However, the set_text() method in this case is different:
public void set_text (string text, int
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
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 () {
>
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
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
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-
Hi,
I decided to learn about drag'n'drop with Gtk+ and found this (very
good) tutorial:
http://live.gnome.org/GnomeLove/DragNDropTutorial
Now I have ported the sample to Vala (see attachment). It would work
with the following changes to gtk+-2.0.vapi
public struct TargetEntry {
publi
"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