I recently had a difficult time with one of those bugs that resolved
spontaneously, but still bothers me because I think it had to do with the
CWR5 text editor. I added two button controls to the main form of my app
and added simple code to the event handler to call up FrmHelp(STRING) modal
forms. I found that one of the controls did not seem to be recognized by
the event handler. As I switched around object numbers, only one control
would work while the other one was not recognized. I couldn't get both
control buttons to work at the same time. All I would get was the button
click but no modal form would pop up as if it was not being caught by the
event handler.
I renamed the strings and controls, duplicated the entire form and even
retyped the code segments line by line with no success. Finally, I added a
FrmAlert(STRING) in front of the non-working FrmHelp(STRING) routine just to
see whether the event handler was recognizing the object and it worked.
Then when I deleted the FrmAlert(STRING) flag routine, the FrmHelp(STRING)
function suddenly started worked fine and has worked fine since. I'm
concerned that simple code that looked fine in the text editor didn't work
right and then seemed to correct almost spontaneously.
I am using CW IDE ver 3.3.2 Build 0228 and was editing in Arial font. The
last two button controls were the ones that I added. Just "one of those
things?"
----------------------------------------------------------------
switch (eventP->eType)
{
case ctlSelectEvent: {
switch (eventP->data.ctlEnter.controlID) {
case MainStartButton:
ClearAllData();
FrmGotoForm(HistoryForm);
handled = true;
break;
case MainRegisterButton:
FrmHelp (AboutString);
handled=true;
break;
case MainInstructionButton:
FrmHelp (InstructionsString);
handled = true;
break;
}
break;
}
--------------------------------------------------------
_______________________________________
Andre S. Chen, M.D., M.B.A.
[EMAIL PROTECTED]
STAT E&M Coder for the Palm OS
Austin Physician Productivity, LLC
www.statcoder.com