hi. i'm new to programming PDAs. i'm currently writing a program that displays
a menu (like in a restaurant situation) and transmits data (the customer's
orders) frm the PDA via serial communication. I'm writing in C++ using
CodeWarrior9.
i've a problem - i am only able to check the checkboxes but not uncheck it. any
insight to how to solve this? below is a segment of my codes. pls do comment.
thx ..
rgds,
JSY
__________
static Boolean MainFormDoCommand(UInt16 command)
{
Boolean handled1 = false;
FormPtr frmP;
switch (command)
{
//Sets pointer to the ChickenBox checkbox and gets it boolean value
case MainChickenBox:
frmP = FrmGetActiveForm();
ControlType *ctl1;
ctl1 =
(ControlPtr)FrmGetObjectPtr(frmP,FrmGetObjectIndex(frmP,MainChickenBox));
chickenBoolean = (Boolean)CtlGetValue(ctl1);
handled1 =true;
break;
//Sets pointer to the BeeefBox checkbox and gets it boolean value
case MainBeefBox:
frmP = FrmGetActiveForm();
ControlType *ctl2;
ctl2 = (ControlPtr)FrmGetObjectPtr(frmP,FrmGetObjectIndex(frmP,MainBeefBox));
beefBoolean = (Boolean)CtlGetValue(ctl2);
handled1 = true;
break;
'
'
'
'
}
return handled1;
}
______________
static string FormatStringtoSend()
{
toSend = toSend + tableNumber;
if (chickenBoolean && ChickenQuantityField != -1)
{
toSend = toSend + "C|" + chickenQuantity + "|";
}
if (beefBoolean && BeefQuantityField != -1)
{
toSend = toSend + "B|" + beefQuantity + "|";
}
return toSend;
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/