Well, my code doesn't work only on Palm OS 5. Actually the pointer
points to field in table which is not in the active form. I tried it
with field which is not in table but still is not in active form and
FldGetTextHandle works fine.

Kaloyan Donev


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Robert
McKenzie
Sent: Thursday, December 12, 2002 18:41
To: Palm Developer Forum
Subject: RE: problem with fields

FldGetTextHandle takes a field pointer as its argument.  I would suggest
that the field pointer you are passing in is most likely NULL or has
become invalid.  It can become invalid if you add other objects to the
field between the time that you get the field pointer and the time that
you use it.  Safest code looks something like this:

{
  FormPtr  frm = FrmGetActiveForm();
  UInt16  index = FrmGetObjectIndex(frm, yourFieldIdHere);
  FieldPtr fld = FrmGetObjectPtr(frm, index);
  MemHandle hText = NULL;

  if (fld != NULL) { hText = FldGetTextHandle(fld); }
  if (hText != NULL) { /* do your stuff here */ }
}

-bob mckenzie, palmsource pdx

-----Original Message-----
From: Henk Jonas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 8:11 AM
To: Palm Developer Forum
Subject: Re: problem with fields


Maybe the pointer to give to the function isn't one of FieldType or it 
isn't on the open forms?

Henk

Kaloyan Donev wrote:
>               Hi all,
>       Can someone tell me what this error means
> "I:\Snoopy\ARM\Core\Emul68K\Src\Field68K.c, Line:253, Form object
> (field) not found." I receive it when I call FldGetTextHandle.
> 
> Thank you,
> Kaloyan Donev
> 
> 
> 


-- 
------------------------------------------------------------------------
-
[EMAIL PROTECTED]
www.metaviewsoft.de

<A
HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
<IMG SRC="http://user.cs.tu-berlin.de/~jonash/werbung_palmos.jpg";></A>
------------------------------------------------------------------------
-


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


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


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

Reply via email to