I'm doing this way, but not working correctly.
void clean_log()
{
//number of items in the list
int total = LBG_object_getnum(_listbox->item_first,LBG_object_last(_listbox));
int ping; //for loop
for(ping =0; ping < total; ping ++)
{
LBG_destroy_listitem(_listbox->item_first);
_listbox->item_first = _listbox->item_first->next;
}
}
I believe the problem is the following reason:
I am destroying the ITEM before knowing what is next on the list.
LBG_destroy_listitem(_listbox->item_first);
_listbox->item_first = _listbox->item_first->next; ??????
know someone give me an idea?