I use the following code to retrieve text from a field...

---------------------------------------------------------------------------------------------------------------------------------------------------------------
        h = MemHandleNew(50);           // allocate chunk of memory in
heap
        FieldPtr = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm,
controlID));
        h = FldGetTextHandle(FieldPtr);
        p = MemHandleLock(h);           // prevent the chunk from moving
(lock) and obtain pointer to location
        MemHandleResize(h, StrLen(p)+1);
        MemHandleUnlock(h);
        return p;
---------------------------------------------------------------------------------------------------------------------------------------------------------------
my question is how to check that the field is not empty.  If the field
is empty, I get a NULL handle error at the designated line.


thanks,

~Tony



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

Reply via email to