[Glade-users] Re: gtk_entry_get_text(gaof)

1. The "new_text" is not a widget. If you want to get the text in=
 the entry, you should
do like this:
            str =3D gtk_entry_get_text (GTK_ENTRY (editable));

2. If you want only the new text, just the "new_text".

Message: 1
Date: Thu, 13 Jan 2005 19:46:57 -0800 (PST)
From: Aaron Yang <porsche1904 yahoo com>
To: gtk-app-devel-list gnome org, glade-users lists ximian com,
=09gtk-list gnome org
Subject: [Glade-users] gtk_entry_get_text

Content-Type: text/plain; charset=3Dus-ascii

hi everyone,

 I've created an entry box and when i type something in the=
 box, I would like to get the information and display it.
 Like the following using glade:

on_entry_insert_text (GtkEditable *editable,
                               gchar          *new_text,
                               gint             =
                               gpointer        position,
                               gpointer        user_data)
 const gchar *str;
 str =3D gtk_entry_get_text (GTK_ENTRY (new_text));

 printf("data entered =3D s\n", str);

error message:
segmentation fault

anyone knows how to solve?


=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1gaof guoguang com cn

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