Hello,
I'm still working on my lottery program. GTK2 doesn't seem to like
something that GTK1 had no problem with.
This code only works in GTK1.2.8 and is causing the errors below, along
with a segfault.
for (i=0; i<3; i++)
{
pick3comp[i] = rand()%10;
tmp = gtk_editable_get_chars(GTK_EDITABLE(pick3entry[i]), 0, -1);
pick3player[i] = atoi(tmp);
g_free(tmp);
}
GLib: Cannot convert message: Conversion from character set 'UTF-8' to
'POSIX' is not supported
(lottoextrasmesg2:31809): GLib-GObject-WARNING **: invalid cast from
(NULL) pointer to `GtkEditable'
(lottoextrasmesg2:31809): Gtk-CRITICAL **: file gtkeditable.c: line 125
(gtk_editable_get_chars): assertion `GTK_IS_EDITABLE (editable)' failed
What is strange is that the code below works in GTK1.2.8 AND GTK2.0.8. I
don't see why the code above would make GTK2 complain when this code
doesn't and I know thats the right section of code that is misbehaving
because that's the only place in the pick3() function that uses
gtk_editable_get_chars().
for (i=0; i<5; i++)
{
pballcomp[i] = rand()%53 + 1;
tmp = gtk_editable_get_chars(GTK_EDITABLE(pballentry[i]), 0, -1);
pballplayer[i] = atoi(tmp);
g_free(tmp);
}
Thanks
Brandon
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list