Generally speaking, if I am going to do anything *fancy* with
a table, I create an "intermediate" data structure to help manage
the table.  This datastructure stands, logically, between the table
and a database.  I usually have this data structure consist of an
array of elements, one per each record I wish to display.  Each
element can hold a record number and such other information as
I find useful (such as record id, whether or not to display it,
whether or not it has been selected, etc.)  I set up the intermediate
data structure from the database, then load the table out of the
intermediate data structure (whether you make the table point to the
intermediate data structure or the database is a matter of style).
At table loading time, you can decide to hide table rows (if you
don't have enough to display), show a scroll bar for the table
(if you have too many to display at once), etc.

You might study the source code for the datebook application to
see an implementation of this idea -- in particular DateDay.c,
which handles datebook's day view display, uses an intermediate
data structure, a handle to which is kept in the global "ApptsH".
This is a quite complex example, but just chock full of nifty
tricks and ideas.

-bob mckenzie
<[EMAIL PROTECTED]>

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim
Astle
Sent: Monday, July 10, 2000 7:00 AM
To: Palm Developer Forum
Subject: Suggestions Please


I have a table that I only want certain records to be viewable.  Currently I
have a sort set up to place the files I want at the top of the table.  I
figured if I could count the number of "matches" in my sort, I could use
that somehow to only display the first X records on the table.  I tried
different ways, but still didn't get any luck.

Has anyone ever done anything like this before?  Keep in mind I've based my
tables from the O'Reilly book.  If you need to see some of my code, just let
me know.  I'm kinda stumped right now.

Sincerely,


Timothy D. Astle

People on Jolt cola write the funniest things.

                                     A-10 Obedience Guide,
                                     Kitty Hawk Studios



--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


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