Hi all,

I have a problem with a global UInt variable.
I want the variable to store the selection number of a list. It works fine
once and then the second time it gets changed, different data is stored. I
am not changing the variable anywhere else.
Do I need to use MemPtrNew with global variables?

Any help would be appreciated

cheers

Hadrian

code:

//global variable
static UInt iPlaylistSelection = 0;

//section in MyFormHandleEvent where variable is changed
  case lstSelectEvent:
  {
   Word listID = event->data.lstSelect.listID;
   ListPtr listPtr = event->data.lstSelect.pList;
   Word selection = event->data.lstSelect.selection;

   if (listID == lstPlaylist)


    iPlaylistSelection = selection;
   }
   break;
  }




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

Reply via email to