Just a shot here, but if the user has put no text into the field (or has
backed it all out), the text handle returned by FldGetTextHandle will be
NULL.  Thus you should check for that.

As a stylistic point, rather than using TblGrabFocus, you can use
TblGetItemPtr for your particular row and column.  TblGrabFocus can have
annoying side effects, both visible and in terms of unneeded events being
generated.

-bob mckenzie, palm pdx

-----Original Message-----
From: amit tipnis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 12:52 PM
To: Palm Developer Forum
Subject: Reading From Tables


Hi,

  I have a table that is scrollable in my application.
The Table scrolling part is working correctly. While
updating a field in the table, I am using
FldSetTextPtr ( ) function call. 

Now my fields are editable. So when i try to read the
table fields, I get an error. This is the way I am
going about it:

        TblGrabFocus ( pTable,row,col ) ;
        
        pField = (FieldPtr)TblGetCurrentField pTable) ;

        pTemp = FldGetTextHandle ( pField ) ;
                                
        pText = MemHandleLock ( pTemp ) ;
                        
        StrCopy ( rsdata.resp, pText ) ;
        
        TblReleaseFocus ( pTable ) ;

        MemHandleUnlock ( pTemp ) ;

  On execution of FldGetTextHandle () function, I am
expecting it to return me some valid handle. It just
returns me a NULL handle. 

  The code is from the standard application
AddressBook. I just cant figure out any other method
of reading the information. Can anyone please help me
out with the same. Thanks in advance,

Regards,

Amit R. Tipnis

=====
" TOUGH TIMES DO NOT LAST LONG BUT TOUGH PEOPLE DO "

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
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