If you're doing your own drawing on the form, you should first call
FrmDrawForm and then do your drawing.

In existing versions of the OS, FrmDrawForm didn't erase the content of the
form; it just drew the border.  But the right thing for it to do is to also
clear out its contents, since after all you're probably not doing that,
right?  (Perhaps you are if you're doing lots of drawing in the content
area, but 99% of the time apps don't.)

So... if we made FrmDrawForm do the "right thing" and clear out its
contents, it messes up applications who drew on the form before calling
FrmDrawForm erased it.

Now if you're not doing raw drawing but instead are just configuring the
on-screen controls, that's fine - they get drawn at the end of FrmDrawForm,
so that's the right time.

We had made this change late in the Palm VII timeframe and found a few apps
which had problems, and so backed out the change because we didn't know how
widespread the problem would be.  It was in the posted Palm OS 3.3 seeding
rom that was recently made available, but the code was again backed out -
presumably as a result of finding too many apps who haven't yet fixed their
code.

Hmm, perhaps we should do the new "right thing" in the debug roms, so that
developers get the impetus to fix their code.  In any case, if you use the
seeded 3.3 rom, you'll be able to determine if you need to change something.

I hope this clarifies...

-David Fedor
Palm Developer Support



>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
>==============================================================



Reply via email to