[gtkmm] Problems with GTK::List



When I try to add (either via append,insert,prepend, etc...) my GList to
my GTK::List object my app always crashes. Here is a snippet of code that
is causing the problem:
("schema_list" is a pointer to my GTK::List object)


	GList *list = NULL;

        ...
        ...

	// Build the list
	tmpptr=tmplist.nameList;
	for (t=0;t<tmplist.numItems;t++) {
		list = g_list_append (list, *tmpptr);
		tmpptr++;
	}

	schema_list->append_items(list);

**tmpptr and tmplist are not important here, they are just what I use to
populate my list.**
If I comment out the schema_list append line there are no problems but
obviously nothing gets done. I also found that if I do a
"list=g_list_last(list);" just before the I try and add it to the list
object It does not crash but the gtk::list is also not populated. I am
really confused on this one. I am not sure where the problem is. Just let
me know if you need more information or whatever.

Thanks in advance.
Jacob Lambrecht






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