Re: [gtk-list] newbie g_list_remove prob




On Thu, 5 Aug 1999, Timothy I. McGinnis wrote:
> I have been trying to use the g_list_remove() function and am not being
> successful.
> 
> I have created a glist called Toys.  I can use this glist in a combo box to
> select the toys and it works find.  Now I want to remove one toy from the
> list.  Using gtk_entry_get_text() on the combo box I get the currently
> selected toy.  I then use this as the second argument to g_list_remove (
> g_list_remove(Toys, selectedToy) ).  But if I read through the glist right
> after the remove the selected Toy is still in the list.  What am I doing
> wrong?
> 

 - Are you assigning the return value of g_list_remove() to your 
   list variable?

 - Are you thinking g_list_remove() is going to look at string 
   contents? It doesn't know it's a string, it just knows 
   about untyped pointers (gpointer, void*)

Havoc




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