I'm trying to save data from several forms onto one record. I have set up a
struct to organize the data. It contains an array of characters of length 1
(this idea from O'Reilly's Palm Programming book) and a few other types.
This approach works fine as long as all the "other types" are written before
I write the string. On the other hand, if I try to write an int (for
example) after having written even part of the string, the string gets
destroyed. I'm pretty sure this is happening because the offset to some of
the other types lands right on the text, which is officially only allocated
1 character. Therefore, an alternative would be to allocate a number of
characters big enough to fit the string to the array, but I'd like to be
more efficient with my space.
The problem arises when I try to append information to the record as I try
to save data from a second form, so I have to write both text and numeric
data to a record that already contains both. I could recreate the whole
record, but that's not very efficient with regard to performance.
Can anyone with more experience offer any ideas to get around this
problem? Any literature that might help?
Thanks in advance.
Luca
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html