At PalmSource, one thing hammered into us developers was that we shouldn't
be drawing anything on a form until we've called FrmDrawForm() to draw it.
The reason for this is that FrmDrawForm() is supposed to clear the screen
before drawing, not that it ever really has, but it's supposed to.
Say I have a function called FieldLoadString(FieldPtr fieldp, Char *text)
which automates the process of dumping text into a field. That is to say,
it creates a new handle, copies in the text, sets the field's handle, frees
the old handle, and then _redraws the field_. Problem.
The problem is that if I use this function to initialize my fields before
drawing, there's no way for the function to know whether or not to (re)draw
the field. Unless of course I tell it. Or is there a way? (That's my
first question.)
Also: I remember Bob Ebert saying that, as a way of enforcing the use of
FrmDrawForm() first, future debug ROMs will do something like make the
active form pointer invalid until FrmDrawForm() has been called. (Did I get
that right, Bob?)
If that's the case, I'm worried that I may not be able to do any
initialization at all before FrmDrawForm(), whether or not I draw my form
objects. If, for example, I try to initialize a selector trigger, I'll need
to get a FrmGetActiveForm() before I can get a pointer to the trigger in
question, or any other form object.
Um, so in summation:
1. Is there any way to determine at runtime when it's okay to draw a
particular form object?
2. Is there a proper way to initialize form objects before drawing,
particularly if the debug ROM is making my form pointer invalid?
Thanks very much for any answers...
oge
----------
Owen G. Emry
Noblestar Systems Corp.
Mobile Computing Practice
[EMAIL PROTECTED]