On Fri, Sep 01, 2000 at 02:23:42AM -0400, Daniel Rubin wrote:
> Hello,
>
> I am baffled! I have just searched usenet to find out how to create
> databases for palm applications and I have turned up nothing. I did
> find one reference to an unnamed tool by Ken Shirriff, but further
> searches have turned up nothing. I want to create an application that
> uses static data so I want to create a .pdb file that would be installed
> with the .prc file. How do you create something like a database of all
> periodic elements that would be used in a periodic table application in
> a development evironment? I am using GCC/prc-tools on a Solaris system
> to build the application. I wouldn't want to check to see if the
> database is there and if not build it using static data within my
> application would I? That seems like a waste of precious palm memory to
> me.
A database is just like a file on a PC - well almost. The pdb format
is documented on palmos.com (in the knowledgebase) and other places.
Basically it is a collection of memory chunks that you just have to
access and lock, and you have your data. The format is up to you. So
for your periodic table, you can create a bunch of strings
(H/Hydrogen/1/1.00atwt/gas/... / = whatever separator you want, nulls,
commas, something else. The structure of a record can be strings or
integers or anything else. It is just a chunk of memory.
My ZBoxZ is opensource (palmboxer.sourceforge.net), and the box
creation (LinBoxer, but it is generic POSIX) programs generate .pdbs
(but aren't documented as to that general purpose - but it would
provide an example or a basis for a GPL derivative).
But in general, you just need to create a header structure and fill it
in, then give file offsets to where each record image is and any
record attributes in a record pointer array, then the images of the
records themselves. And give it a .pdb extension.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/