On Fri, 4 Jan 2002, Michael Glickman wrote: > > What I'm doing right now is allocating one block of memory to store a > > line (after word wrapping) and keeping an array of handles. Those > > blocks are allocated and freed as text is displayed. > > That might be the way to go. Assuming you keep your documents in the > data base, you can probably read straight from the data storage (with no > need to copy them to dynamic heap); I assume you lock only handles for > the records which are currently displayed, otherwise that could get > PalmOS terribly engaged.
I jsut re-read the part that you were replying to. The problem with that is, esp. if I keep all of the display buffering in a single database (which I intend to), it's hard to track what record numbers go with what lines on what windows. The reason for that is that when I delete one line that I no longer need, the ones after it get renumbered. It would be possible to use categories, but it's possible to have more than 16 display windows. I could adjust the numbering in the array that kept track of that, but it seems like less work to put the entire buffer (all lines) for a display window in a single record, and manage it there. I could store in an array the starting points of lines and shift those whenever I needed to scroll the display buffer (delete old lines in favor of new ones). ----------------------------------------------------------------------- Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/ Software Developer // Gamer // Webmaster // System Administrator "Buckle your seatbelt, Dorothy, 'cause Kansas is going bye-bye." -Cypher -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
