U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to previous message
lundman is currently offline  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.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ColumnList question (move and delete item)
Next Topic: Strange behaviour of my modal dialog
Goto Forum:
  


Current Time: Sat Jul 25 13:11:14 GMT+2 2026

Total time taken to generate the page: 0.00762 seconds