In the sample code for Address.c (provided with the SDK), the custom
table save data callback function is EditViewSaveRecordField(void *
table, Int16 row, Int16);

In that function, it attempts to call FldGetTextHandle() (line 2782) to
get the field handle associated with the table cell. Now, in the
documentation, the writeup for TableSaveDataFuncType() says that (I
quote)

"Note that the table manager already disassociates the memory
handle from the text field for you so that the memory associated
with your data is not freed when the field is freed." (page 426)

I suppose the dissassociation was done with FldSetTextHandle(fld, NULL)
somewhere in the table manager.
Now, how can Address.c's EditViewSaveRecordField() do a
FldGetTextHandle()? Wouldn't that return a NULL?

At the end of the custom save callback function, a FldFreeMemory() is
called. Can I call MemHandleFree() instead? In my table, the field is
single line and editable, so I probably don't need the extra stuff that
FldFreeMemory() provides. Am I missing something?

One more thing, in the Address.c sample source, line 2925, a comment is
made "Free the memory used for the field's text because the table
suppresses it." How is the table mamager suppressing the memory?

Thanks all!

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