Re: Help Required to Set a Entry



On Tue, 2003-12-23 at 20:47 -0800, raj kumar wrote:
how to set a test for an entry.
its giving the below errors,

"Segmentation fault"

so how to set and get from an entry, can i have a
working program using these functions.

regards
Raj

You must not modify or free the return from gtk_entry_get_text(),
because it returns G_CONST_RETURN gchar *, not gchar *. If you want to
store the string in a struct or something, use

s->data = g_strdup(gtk_entry_get_text (GTK_ENTRY (entry)));

-- 
Peace,

    Jim Cape
    http://ignore-your.tv

    "It is literally true that, like Christianity, Socialism
     has conquered the world by defeating itself."
        -- Alexander Berkman, ABC of Anarchism

Attachment: signature.asc
Description: This is a digitally signed message part



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