Gordon,
You could keep a static structure including a current row value. When the row in the
structure is not equal the current row, load a new row into the structure. This way
you perform one record load per row and it doesn't matter whether the columns are
called in ascending order or not or that column 0 may not be called at all.
Doug Hines
-----Original Message-----
From: Gordon, Douglas [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, February 10, 2000 7:51 AM
To: Palm Developer Forum
Subject: Table drawing technique
I have a table with four columns that uses custom draw procedures. Each row
is associated with a database record, and various fields in a record are
used to display information in that row. The issue is that my custom draw
procedure is called for each column in a particular row, so currently it has
to query the record, lock it, get the data for the specific column, and
unlock it. That's four record accesses to display each row. This seems like
excessive overhead that could be avoided. What I was thinking was that if I
can assume (dangerous word!) that the column draw procedures are always
called in ascending sequence, then the draw procedure for column 0 could
save the display information for the other columns in a static structure,
and I would only have to do a record access once per row instead of once per
column per row.
On the other hand, assumptions like these are what can get you into trouble.
It may work like this today, but not be guaranteed to work that way in a
future O/S release. Any ideas?
Doug Gordon
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html