it's been this way from day one, and the SDK docs do mention that
FrmDrawForm saves the bits behind the form. if you think about it, this
clearly implies that you can't draw before calling FrmDrawForm, but it
doesn't spell it out. (yes the docs are sparse, but i am immensely grateful
to Palm for allowing developers to have access to the OS source!). in more
recent versions of the OS it enforces it better, which is a good thing
because it will actually prevent you from running into strange bugs where
sometimes when you close your form, the from beneath it wouldn't get
restored correctly. that's actually a pretty frequent newbie bug. so i
think Palm is only helping both the developers and the users by changing the
OS to make it obvious what's going on.
as Neil suggested, you can initialize everything, just don't use any calls
that draw anything. this is easy to test for in a debug version of your
app. for instance you could insert a long pause (via SysTaskDelay(SECONDS *
SysTicksPerSecond())) immediately before calling FrmDrawForm, so that you
can verify that you didn't paint over anything.
----- Original Message -----
From: John Powers <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 10, 1999 6:22 PM
Subject: FrmDrawForm when?
> Hmmm... I guess I've been living in some far-off fantasy world, but I
> haven't heard about this "drawing *after* calling FrmDrawForm" requirement
> before. My applications usually have an "Init" function called from
> frmOpenEvent in the form event handler that sets up the content of tables,
> fields, or whatever and finish with FrmDrawForm(). Is this no longer
> recommended? What should I be doing?
>
> --john
>
> >>3. The behavior of the FrmDrawForm API has been changed, in a specific
> >>way that is likely to cosmetically break some applications. Is this an
> >>intended change for 3.3?
> >
> >Sigh, this again. Well, it still indicates incorrect behavior in your
app
> >- you should do your drawing *after* calling FrmDrawForm, because it is
> >correct for it to clear its content the first time it is coming up. But
> >this code has been taken out, again, as it happens. Consider this a
> >temporary reprieve, or as strike 2... (as in, 3 strikes and you're out!)
>
> ----------- Software for the Connected Lifestyle ------------
> John Powers Poohbah Industries
> The Grand Poohbah http://www.poohbah.com
> ==============================================================
>
>
>