Home » U++ Library support » U++ Widgets - General questions or Mixed problems » DropList cores on ClearList()
Re: DropList cores on ClearList() [message #2793 is a reply to message #2787] |
Tue, 25 April 2006 15:12   |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
cvs -d ":pserver:anoncvs@lundman.net:/home/cvsroot" login
"anoncvs"
cvs -d ":pserver:anoncvs@lundman.net:/home/cvsroot" co UFxp
However, debugging by commenting crap out, I have tracked it down.
If in my reply to SITELIST, I simply Droplist.Add() it works, ie, commenting out my dreadful attempt to sort the Droplist.
If I put this code in, it will die:
if (data.Has("END")) {
// Sort list, then populate gui
// Create a map between names and siteid
VectorMap <String,int> namelist;
Dict *tmp;
for (int i=0; i < sitelist.GetCount(); i++) {
tmp = &sitelist[i];
namelist.Add(tmp->Get("NAME"), atoi(tmp->Get("SITEID")));
}
// Sort said map based on name
Vector<int> o = GetSortOrder(namelist.GetKeys());
// Look up name/id based on sorted order. This could use "namelist" ins\
tead
// of sitelist though.
for(int i = 0; i < o.GetCount(); i++)
gui->do_SiteAdd(atoi(sitelist[o[i]].Get("SITEID")), sitelist[o[i]].\
Get("NAME"));
// Tell GUI the end is reached.
gui->do_SiteAdd(-1, "");
return;
}
Most likely because the Strings given are on the local stack.
|
|
|
Goto Forum:
Current Time: Fri Aug 01 13:32:20 CEST 2025
Total time taken to generate the page: 0.10089 seconds
|