Jeff Wheeler wrote:
>Subject: Need global data advice
>From: "Jeff Wheeler" <[EMAIL PROTECTED]>
>Date: Thu, 26 Jul 2001 09:22:32 -0500
>X-Message-Number: 24
...
>1. Change my requirements. If I require an OS 3 device, I get
>up to 36K of useable memory. 3K doesn't seem so bad in that case.
That's one way. Unfortunately, that seems to have gotten us Win2k,
and, God forbid, Pocket PC. BTW, it only takes having to work on that
demon-spawned POS for a day or two for you to realize how much better
the Palm is. The PPC emulator truly, truly sucks. But I digress.
>2. Store the data in a database, and require that the database be installed
>with my app. I'd like to avoid this becaue I'm lazy and it introduces
>additional problems: designing the data architecture, creating
>the database, bundling it with the app, then getting data from it.
Close, but here's a different idea:
Put the data that you need into a routine that creates the database on
the fly. When your app starts up, it looks for the database. If it
is there, good; if not, it calls the routine and creates it. The up
side is that you don't need a database separate from the app. The down
side is that you have a prc that is (at least) 3k larger than it would
otherwise be. However, the 3k is going to cost you somewhere and I'd
prefer it in the prc than in a separate pdb or dynamic memory.
>3. I've seen programs that are "huge" (256K) that contain
>entire electronic >books built into the .prc file. I assume that
>the data is being embedded in the resources somehow. I haven't
>found any kb articles on using an app's resource as a data repository.
>If this can be done, can you point me to additional information?
I suppose that you could do it that way, but the way that I'd do
it is as above, with routines (each fairly small) in their own
segments and move to the next routine when I reach the end of one.
Is the 3k going to go up? I find that in my apps it usually does.
If so, maybe you should consider compressing the data. It would
cost source overhead, complexity, maybe some dynamic memory, but
might allow smaller databases (and smaller routines to create the
databases). Who has the smallest compression library?
HTH
Clark
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/