Say, for example, that I want to initialize the selection in a list before I
draw the form. LstSetSelection(), however, does several draws, including
inverting the new selection, redrawing the list, etc., and as far as I can
tell, it does this regardless of whether FrmDrawForm() has been called.
What, then, is the correct way to initialize a list's selection?
Thanks again in advance,
oge
> -----Original Message-----
> From: [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, November 01, 1999 14:55
> To: [EMAIL PROTECTED]
> Subject: Re: Form object initialization
>
>
[snip]
> So to summarize, you should have no problems initializing your objects
> after
> FrmSetActiveForm or drawing your objects after FrmDrawForm.
>
>
> -Roger Flores
>
>
>
>
>
>
>
> "Emry, Owen" <[EMAIL PROTECTED]> on 11/01/99 10:59:13 AM
>
> Please respond to [EMAIL PROTECTED]
>
> Sent by: "Emry, Owen" <[EMAIL PROTECTED]>
>
>
> To: [EMAIL PROTECTED]
> cc: (Roger Flores/HQ/3Com)
> Subject: Form object initialization
>
>
>
>
> 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]
>
>
>
>
>
>
>
>