Hi Nick,
> The code looks OK so it sounds like a sequencing problem. Hard to tell
> without more info.
> Are you calling UpdateTextField() from the popup form's event handler?
I'm calling UpdateTextField() in most cases during the frmOpenEvent in the
form handler, followed by a FrmDrawForm(FrmGetActiveForm()) and then
returning true.
> Also "any field ... does not get erased when the original form gets
> redisplayed" seems to imply that these fields remain on the screen while
> everything around them is restored. Is this really what happens?
"any field" is in regards to any field that I called UpdateTextField()
with. Those fields are NOT erased, while all the others are.
I've got a small 'demo' CW project of the problem, but here is the other
two functions that you may want to see :) If you want to see the project,
it's like 22K zipped up. It has the same behavior under both my Palm V,
and under POSE b29 under Windows.
The main form has a button that pops up the Popup form. The event handler
is getting set for the Popup form in the ApplicationHandleEvent() area.
Boolean PopupFormHandler(EventPtr event) {
Boolean handled = false;
FormPtr form = FrmGetActiveForm();
switch ( event->eType ) {
case frmOpenEvent:
UpdateTextField(PopupField1Field, "field 1", true);
FrmDrawForm(form);
handled = true;
break;
case ctlSelectEvent:
switch ( event->data.ctlEnter.controlID ) {
case PopupOKButton:
FrmReturnToForm(0);
handled = true;
break;
}
break;
} /* switch */
return handled;
}
Boolean MainFormHandler(EventPtr event) {
Boolean handled = false;
FormPtr form = FrmGetActiveForm();
switch ( event->eType ) {
case frmOpenEvent:
FrmDrawForm(form);
handled = true;
break;
case ctlSelectEvent:
switch ( event->data.ctlEnter.controlID ) {
case MainShowItButton:
FrmPopupForm(PopupForm);
handled = true;
break;
}
break;
} /* switch */
return handled;
}
Thank
-J
> Regards, Nick