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

Re: GtkList problem



Havoc Pennington [hp@redhat.com] wrote:
> 
> On Sun, 29 Aug 1999, Ajit Krishnan wrote:
> > 
> > items = g_list_append ("item1");
> > items = g_list_append ("item2");
> > 
> > list = gtk_list_new();
> > gtk_list_append_items (GTK_LIST(list), items);
> > 
> > and the code segfaults at gtk_list_append_items.
> > as far as i can tell, it is right since these are the appropriate 
> > function prototypes from the GTK+ reference material
> > 
> 
> Ah yes, but C is not type-safe so the fact that the prototypes match gets
> you only half-way. I believe it is supposed to be a list of GtkListItem or
> something.

what? c is not type-safe? :-)

In my original post, i had included these (from the gtk+ ref material):
  GtkWidget* gtk_list_new (void)
  void gtk_list_append_items (GtkList *list, GList *items);
                              ^^^^^^^^^      ^^^^^^^

to me, this seems to imply that it must indeed be of type GtkList* and 
GList* and not of type GtkListItem* or GtkCList*......am i wrong in 
my assumption?

ajit

> 
> If you're inserting strings, GtkCList is a better choice anyway, more
> lightweight and faster.
> 
> Havoc
> 
> 
> 
> -- 
>          To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
>                        "unsubscribe" as the Subject.
> 
> 	Mailing list concerns should be mailed to <listmaster@redhat.com>

-- 
Ajit Krishnan
ajit@home.com
akrishna@julian.uwo.ca



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