Re: gtk_object_set_data (GList)?
- From: Paul Davis <pbd Op Net>
- To: "Andr s" Giraldo <andres_giraldo yahoo com>
- Cc: Gtk List <gtk-list gnome org>
- Subject: Re: gtk_object_set_data (GList)?
- Date: Thu, 12 Jul 2001 11:22:35 -0400
>1. can't convert void * to data, either if I do
>something like
this:
comboitem = (struct 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...
thats because i didn't even bother to read the posted example, which
is completely wrong. the GtkCombo *requires* a GList of char *,
nothing else will do. you'll need to find some other method if you
want to associate strings with data pointers.
typically, i use a static array of strings, and then scan the array
for the chosen string. this gives me an index, which i can use to
access some array of data pointers. but there are lots of other ways
to do it.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]