Mick,
I spent some time yesterday checking my apps for 3.5 compatibility and I
have seen what seems to be exactly your situation. Not calling FrmDrawForm
before the WinEraseRectangle gets called (in FrmHideObject), can result in
this error. WinDrawRectangle also needs to have a form drawn first. My
understanding is that with color, OS 3.5 is wanting to be clear where to
draw to.
OS 3.5 looks good. I did not run into any problems other than using
FrmDrawForm at the correct time.
Keith
Mick Doe wrote:
> Hello!
>
> I have a part of source code which works fine for all Palm OS except 3.5
> (palmos35-dr4-en-colordbg.rom). Here it is:
>
> // Draw "please wait" form
> FormPtr frmWait = FrmInitForm (WaitForm);
> FrmDrawForm(frmWait);
> // Do something lengthly ..
> FrmEraseForm(frmWait);
> FrmDeleteForm(frmWait);
> //
> ....
> FormPtr frm = FrmGetActiveForm();
> FrmHideObject(frm, FrmGetObjectIndex(frm, Field1)); // error is here
> FldSetTextHandle(ctx, (Handle) HandleText);
> FrmShowObject(frm, FrmGetObjectIndex(frm, Field1));
>
> The error is two strange letters (I use CW5, POSE 3.0a3 W98) .. the
> stack is:
> ...
> FrmHideObject
> FldEraseField
> WinEraseRectangle - movea.l 26(a3),a2 - error at this instruction
>
> What does it mean? How can I avoid this?
>
> Any help is welcome!
>
> Regards,
> Mick Doe