Hello Hadrian,

What I can see: Your changing the global variable in the line
"iPlaylistSelection = selection;" This will happen everytime you select a
new item in the list (general knowledge).

Regards,

Lennie De Villiers

PocketStudio Professional
Pocket-Technologies.Inc
- www.pocket-technologies.com

Write PalmOS Applications With Your Delphi Skills!

> 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

> //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