GTK_IS_ENTRY failed



I'm not sure if this is just a problem with my C skills (inwich isnt
very good yet), or something else. But I anyways try my luck here to see
if anyone can help me out :)

I'm making a GUI that works against a MySQL database. In the initial
start I make a config file, if it doenst exist, fetching various info
(login, pass, etc).

If you see the attached C file you will find that i use an 
GtkWidget *entry[4];

make new entry box'es on them. This works fine and they show up fine in
the gtk window, but when I try to use
gtk_entry_get_text(GTK_ENTRY(entry[0])); it manages to fetch the text
from the first 4 entry box'es, but the 5th (entry[4]) it errors with:

(a.out:10441): GLib-GObject-WARNING **: invalid cast from `GtkButton' to
`GtkEntry'

(a.out:10441): Gtk-CRITICAL **: file gtkentry.c: line 3421
(gtk_entry_get_text): assertion `GTK_IS_ENTRY (entry)' failed

my bad? or something else?

Any help appreciated.. :)

-- 
Thomas Ugland

-> If everything is coming your way then you're in the wrong lane. <-

Attachment: temp.c
Description: Text Data



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