Try this from the Palm OS Tutorial.
CharPtr text;
text = FldGetTextPtr(GetObjectPtr(fieldID));
if (text!= NULL && *text !=0) // test for NULL or zero length string
{
// somthin' in field
} else {
// nothin' in field
}
Paul Fearn
-----Original Message-----
From: Shin Tanaka [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 13, 1999 10:51 AM
To: [EMAIL PROTECTED]
Subject: [Q] To find if a field is used or not...
Hi, folks! I have a question.
How can I find out if a field has a string or not? I've been doing this;
------------------------------------------------------------------------
CharPtr fldStringPtr = FldGetTextPtr(GetObjectPtr(fieldID));
if (fldStringPtr == NULL)
{
// Nothing in the field. do something.
}
else
{
// Something in the field. do something
}
------------------------------------------------------------------------
Is this right method? Is there any simpler way to find out if the field is
used or not?
Thank you very much for taking the time to read my email. I really
appreciate it.