Generally speaking, fields like/use handles not pointers.

They lock the handle when the field has the focus (for editing), but
otherwise it remains unlocked.  They can also resize the handle, moving any
memory after that given to the field down, so be careful.  Or they can
"compact" the field, which will possibly resize the handle (smaller) and
move (any existing) memory after that given to the field (but given to the
handle) up.

When you give/receive data from a field it is generally safest to (1) make
sure it doesn't have the focus; (2) use handles; (3) if it had the focus
prior to your mucking with it, you can restore the focus to it afterwards.

-bob mckenzie, Palm PDX

-----Original Message-----
From: Dave Mottorn [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 26, 2001 7:07 AM
To: Palm Developer Forum
Subject: RE: Editing Fields


        That worked.  I thought FldGetTextPtr returned a locked pointer.
How does
it get unlocked?

        Is there a better reference available than what I'm using?  I'm
working on
a very simple application but I'm pretty well committed to do some things
that are a lot more complicated.

regards,

Dave Mottorn

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brian
Smith
Sent: Monday, November 26, 2001 9:41 AM
To: Palm Developer Forum
Subject: RE: Editing Fields


It looks like the problem is in your ReadField function.  Either get rid
of the call to MemPtrUnlock that's in there, or use the FldGetTextHandle
instead.

----------------------------------------------------------------------
Brian Smith  //   [EMAIL PROTECTED]   //  http://www.arthurian.nu/
Software Developer  //  Gamer  //  Webmaster  //  System Administrator
Bumper sticker: If you can read this, I can hit my brakes and sue you.


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



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

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

Reply via email to