When a field is initialized by the system, it has no text yet, so the field
manager doesn't allocate a handle for it. You'll need to allocate your own
and copy text to it (or you may already have such a thing handy), and use
FldSetTextHandle to put it in place. Finally, if you have already drawn your
form, call FldDrawField to make the contents visible (not needed if you
haven't drawn the form yet: FrmDrawForm will make it all appear at once).

JB @ PalmSource


on 10/10/02 2:05 AM, Nick Amato at [EMAIL PROTECTED] 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.
> 
> I have used the same function when a button is pressed to retreive the data
> that is in the fields and it worked as I thought it would.  Anyone have any
> ideas why?
> 
> Thanks
> 
> Nick
> 
> 


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

Reply via email to