> Manually call FrmDrawForm in your dialog code, then init the
> fields, then do FrmDoDialog.

OK, I tried this one too, just as an exercise. It worked, but there are some 
caveats. At first, I did FrmInitForm, then FrmDrawForm, then wrote to the 
fields, then called FrmSetEventHandler and FrmDoDialog. This didn't work - it 
was still writing on the screen beneath the form.

Then I figured out that this was happening because the new form, although 
loaded and drawn, was still not active - it is FrmDoDialog that makes it 
active. So, I inserted a FrmSetActiveForm before the call to FrmDrawForm.

That worked - once. Then I immediately got a crash. I figured out that this was 
happening because I was setting the new form as active - but was not making the 
old one active once the new one was deleted.

So, I started saving the currently active form (FrmGetActiveForm), then doing 
the whole FrmInitForm, FrmSetActiveForm, FrmDrawForm, set fields, 
FrmSetEventHandler, FrmDoDialog, FrmGetControlValue, FrmDeleteForm thing, and 
then finally restoring the original active form via FrmSetActiveForm. This 
finally worked.

Regards,
Vesselin
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to