Re: gtk_object_set_data (GList)?
- From: "Andrés" Giraldo <andres_giraldo yahoo com>
- To: Paul Davis <pbd Op Net>
- Cc: Gtk List <gtk-list gnome org>
- Subject: Re: gtk_object_set_data (GList)?
- Date: Thu, 12 Jul 2001 08:08:06 -0700 (PDT)
typedef _data
{
char *string;
int value;
} data;
data comboitem;
GList *liste = NULL;
> comboitem = g_malloc(sizeof(struct _data));
> strcpy(comboitem.string, "toto");
> liste = g_list_insert(liste, comboitem, 0);
>
> comboitem = g_malloc(sizeof(struct _data));
> strcpy(comboitem.string, "tata");
> liste = g_list_insert(liste, comboitem, 0);
Ok! 2 questions...
> comboitem = g_malloc(sizeof(gchar)*20);
1. can't convert void * to data, either if I do
something like
comboitem = (data)g_malloc(sizeof(struct data));
2. I use gtk_combo_set_popdown_strings to add the
glist to the combo, but... if I use a structure... it
only shows ASCII codes and not the strings...
Thanks for your help!
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]