Thanks for everyone's different explainations, now I understand a little
more.  The program actually does what I want it to now.  Once I did some
digging I found another function from greg's glib that would easily set the
field text and simplified the multiple api calls.

"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:97963@palm-dev-forum...
>
> At 23:05 2002-10-9 -0700, you wrote:
> >I'm trying to set text in a field when a form opens, the problem is that
I
> >keep getting a null handle. I make a call to a function I received along
> >with greg winton's FTPview example.
> >
> >   nameH = GFrmGetFieldTextHandle (formP, SigninNameField);
> >   nameP = nameH ? (Char*) MemHandleLock (nameH) : NULL;
> >
> >within the function the line that causes this,
> >
> >  fieldTextH = FldGetTextHandle (fieldP);
> >
> >The fieldP is not null but the function call returns a null handle, does
> >that mean that the handle is locked during the frmOpenEvent?  I'm a bit
> >confused.
>
> The field will have a NULL handle until the user tries to enter text into
> it.  You can allocate the handle yourself if that call returns NULL --
just
> call MemHandleNew, get one of the appropriate size, then use
> FldSetTextHandle to install it into the field.  The system form close code
> will deallocate the handle when the form goes away.
>
> --
> Ben Combee <[EMAIL PROTECTED]>
> CodeWarrior for Palm OS technical lead
> Palm OS programming help @ www.palmoswerks.com
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to