UInt16 wControlIndex = FrmGetObjectIndex( frmP, MainBeefBox );
Int16 wValue = FrmGetControlValue( frmP, wControlIndex );
FrmSetControlValue( frmP, wControlIndex, !wValue );
J> 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
J> communication. I'm writing in C++ using CodeWarrior9.
J> 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.
J> thx ..
J> rgds,
J> JSY
J> __________
J> static Boolean MainFormDoCommand(UInt16 command)
J> {
J> Boolean handled1 = false;
J> FormPtr frmP;
J> switch (command)
J> {
J> //Sets pointer to the ChickenBox checkbox and gets it boolean value
J> case MainChickenBox:
J> frmP = FrmGetActiveForm();
J> ControlType *ctl1;
J> ctl1 =
(ControlPtr)FrmGetObjectPtr(frmP,FrmGetObjectIndex(frmP,MainChickenBox));
J> chickenBoolean = (Boolean)CtlGetValue(ctl1);
J> handled1 =true;
J> break;
J> //Sets pointer to the BeeefBox checkbox and gets it boolean value
J> case MainBeefBox:
J> frmP = FrmGetActiveForm();
J> ControlType *ctl2;
J> ctl2 =
(ControlPtr)FrmGetObjectPtr(frmP,FrmGetObjectIndex(frmP,MainBeefBox));
J> beefBoolean = (Boolean)CtlGetValue(ctl2);
J> handled1 = true;
J> break;
J> '
J> '
J> '
J> '
J> }
J> return handled1;
J> }
J> ______________
J> static string FormatStringtoSend()
J> {
J> toSend = toSend + tableNumber;
J> if (chickenBoolean && ChickenQuantityField != -1)
J> {
J> toSend = toSend + "C|" + chickenQuantity + "|";
J> }
J> if (beefBoolean && BeefQuantityField != -1)
J> {
J> toSend = toSend + "B|" + beefQuantity + "|";
J> }
J> return toSend;
J> }
--
Best regards,
Vladimir mailto:[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/