Hi Folks,
I decided to get into user interface more recently, and created this
code:

        //Create second dynalist with options
        if(selection!=-1)
        {
                char** dynaptr;
                int numofitems;
                int i;
                dynaptr=MemPtrNew(9*sizeof(char*));
                for(i=0;i<9;i++)
                {
                        dynaptr[i]=MemPtrNew(20);
                }
                StrCopy(dynaptr[0],"Query");
                StrCopy(dynaptr[1],"Whois");
                StrCopy(dynaptr[2],"Time");
                StrCopy(dynaptr[3],"Ping");
        
StrCopy(dynaptr[4],field[selection].ignore?"Unignore":"Ignore");
                numofitems=4;
                if(isOp)
                {
                        StrCopy(dynaptr[5],"Kick");
                        StrCopy(dynaptr[6],"Ban");
        
StrCopy(dynaptr[7],field[selection].o?"De-Op":"Op");
        
StrCopy(dynaptr[8],field[selection].v?"Devoice":"Voice");
                        numofitems=9;
                }
        
LstNewList(&pForm,DLstUserOpts,20,20,80,120,stdFont,9,0);
        
LstSetListChoices(getObjectPtr(pForm,DLstUserOpts),dynaptr,numofitems);
        
selection=LstPopupList(getObjectPtr(pForm,DLstUserOpts));
                //Free the list
        
FrmRemoveObject(&pForm,FrmGetObjectIndex(pForm,DLstUserOpts));
                //Trigger the commands

The moment the list gets displayed, all I get is a Fatal Alert at the
Popup.

I suspect my command array is faulty - any ideas?

--------------------
Best regards
Tam Hanna

http://tamspalm.tamoggemon.com
Palm OS and IT management news

http://www.palmfilefind.com
FileFind for Palm OS - find files on your memory card

http://www.palmbinaryclock.com
The Binary Clock for Palm OS


-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to