SUBJECT: Text table field with in-place editing Dear Listers:
I have a database whose records consist of variable sized strings, sequentially following each other. This is tied to a table with the same number of columns (of type textTableItem) as the number of strings in one record. Using in-place editing (as in the Address Book sample), the cells in the table are updated. But there is a small variation here. I have a requirement to blank out the cell when the taps in it for input. Then, if the user exits the cell without entering any data, I need to restore the data that existed before blanking the cell. I am going about it in the following manner: 1. In tblEnterEvent: Use DmDetachRecord to detach the record associated with the currently editing row. Store the returned handle for use in restoring the row contents if necessary. 2. Add a blank record at the same index in the table's base database. 3. Refresh the table. As a result, the cell now displays cleared with the insertion point in it. Doing the above 3 steps in tblSelectEvent would also give the same result. Now, after the application has consumed the tblEnterEvent and the tblSelectEvent which follows it immediately, the user either enters data or leaves the cell blank, and the cell loses focus. If the cell is left blank(I ascertain this after verifying the corresponding record in the base database), I need to do the following: 1. Remove this empty record from the database 2. Add the old data as a record at the same position in the database. 3. Refresh the display. However, I have been unable to determine at what point I can restore the data into the table's display? The tblSelectEvent is consumed even before the user has entered any data (it is posted immediately after the stylus is tapped in the cell). What I am trying to do is restore back the old data in the database, and update the table so that the empty row is repainted with its earlier contents. Any advice / suggestions / alternates appreciated. Thanks in advance, csrins __________________________________________________ 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/
