> When I've needed to do this, I've just setup a series of controls in
> Constructor, made sure they had sequential ID numbers, and
> then referred to
> them at runtime using the initial ID number + the index of
I've never trusted Constructor to not change things on me, and there's
always the possibility that I'll change something, so I've always just
done this type of thing:
static UInt16 PlayingFormNumToID(UInt8 i)
{
switch (i) {
case 0: return Playing1PushButton;
case 1: return Playing2PushButton;
case 2: return Playing3PushButton;
case 3: return Playing4PushButton;
case 4: return Playing5PushButton;
case 5: return Playing6PushButton;
case 6: return Playing7PushButton;
case 7: return Playing8PushButton;
case 8: return Playing9PushButton;
}
return 0; // Just because you've gotta return something
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/