> The following code works great on a release ROM, but crashed with a BUS
> ERROR on a debug ROM.  I'm pretty sure this because the form structure is
> not valid until after the FrmDrawForm function has been called.
> 
> case InvoiceForm:
>     FrmSetEventHandler(frm, MyFormHandleEvent);
>     FrmInitForm(frm);
>     MyRestoreDisplay(); // Populate form data from database. (***Crashes in
> here)

>     FrmDrawForm(frm);
>     break;
> 
> If I call MyRestoreDisplay() after FrmDrawForm(frm), it fixes the problem,
> but the form is momentarily drawn with invalid data before quickly being
> populated with the correct data.

  debug rom gives window pointer (address) as 0x80000000 if the active
  form has not been drawn yet :) the topic has come up a number of times
  before, check the archives.

> I'm sure there is a better way to do this, but how?  Can I call
> FrmDrawForm(frm) without the form actually drawing, or is there a better
> way??

  draw the from before you mess with it.. simple :)

// az
[EMAIL PROTECTED]
http://www.ardiri.com/    <--- free games!


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

Reply via email to