Martynas Jocius wrote:

> Hi,
> I am newbie so my question is simple:
> How can I get a text from GtkText widget? I know there is function
> "gtk_editable_get_chars" of GtkEditable widget, buf if I use this I get
> segfault.
> I want do someting like this:
> [...]
> char *comment = strdup(gtk_editable_get_chars((GtkEditable *)text_comment, 0
>                               gtk_text_get_length(GTK_TEXT(text_comment))));
> [...]
> where text_comment is (GtkText *) object. It compiles ok, but segfaults.
> I tried to find some examples of using GtkText, but I coundn't find...
> 


GtkWidget *ball[6];
ball[0] = gtk_editable_get_chars(GTK_EDITABLE(entry[0]), 0 , -1);

You must not have read the documentation for how the 
gtk_editable_get_chars() is supposed to be setup. I simply use the above 
and it works fine.


_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to