Thank you Dane. I did not realize that Carl was talking about PalmOS
Library.
About the creator ID & type issue:
If two database have same creator IDs and types but with different names,
DmOpenRef gDB= DmOpenDatabaseByTypeCreator(kDBType, kDBCreator, mode);
Will get which one?
But I have not tried it.
Regards,
Herman
======================================
From:
Palm OS Programmer's Companion, Volume I 15
Assigning a Database Type and Creator ID
Each Palm OS application is uniquely identified by a four-byte
creator ID. Assigning this same creator ID to all of the databases
related to an application associates those databases with the
application. The OS takes advantage of this; for instance, the
launcher's Info panel uses the creator ID to calculate the total
memory used by each application.
Each database on the Palm device has a type as well as a creator ID.
The database type allows applications and the OS to distinguish
among multiple databases with the same creator ID. For
applications, set the database type to sysFileTApplication
('appl'). For each database associated with an application, set the
database type to any other value (as long as it isn't composed
entirely of lowercase letters, since those are reserved by Palm).
Certain predefined types-such as 'appl' (application) or 'libr'
(library)-have special meaning to the Palm OS. For instance, the
launcher looks at the database type to determine which databases
are applications.
Types and creator IDs are case-sensitive, and are composed of four
ASCII characters in the range 32-126 (decimal). Types and creator
IDs consisting of all lowercase letters are reserved for use by Palm
Inc., so any type or creator ID that you choose must contain at least
one uppercase letter, digit, or symbol 1 .
To protect your application from conflicting with others, you need
to register your creator ID with Palm, which maintains a database of
registered IDs. To choose and register a creator ID, see this web
page:
http://www.palmos.com/dev/creatorid/
Note that you don't need to register database types as you do
creator IDs. Each creator ID in effect defines a new space of types, so
there is no connection between two databases with type 'Data' but
with different creator IDs.
-----Original Message-----
From: Dave Lippincott [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 2:51 PM
To: Palm Developer Forum
Subject: Re: Startupcode.lib with Creator ????
I have an issue with the statement:
"To uniquely identify a database the system uses two things: a type and a
Creator ID. Both are four-character names."
Actually its false.
Each database (PDB, PRC or PQA) is uniquely identified by the file name and
not the creator ID. Creator IDs are used to distinguish themselves from one
another but are not used uniquely identify files on the Palm. Two files
with the same name but different creator IDs and/or types would still
conflict on the Palm. Only the last one to be installed would survive.
Something like 'A database/file on the Palm is uniquely identified by its
name. The creator ID and type are used by the OS and applications to help
identify applications and data. Palm requires the Creator ID used by an
application to be unique.' (register it for free, bla, bla, bla)...
----- Original Message -----
From: "He, Herman" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 2:23 PM
Subject: RE: Startupcode.lib with Creator ????
> From:
> http://www.codewarriorU.com
> Sign in (free) Palm OS Programming with CodeWarrior
> Lesson 3: A First Program
>
> The Creator ID
>
> Remember, since there is no file system on the Palm, everything is stored
as
> a database, including applications. To uniquely identify a database the
> system uses two things: a type and a Creator ID. Both are four-character
> names. All applications use the same type, "appl", but the Creator ID is a
> value you assign.
> To change the Creator ID of the application, open the project settings
> dialog and select PalmRez Post Linker in the left-hand pane, as shown in
> Figure 3-12. On the right you'll see a Creator text field with value STRT
.
> You need to replace STRT with your own Creator ID. As an example, change
> STRT to sTRT .
> Changing the Creator ID is very important for two reasons. First, their
> Creator IDs uniquely identify applications, and installing an application
> with a duplicate Creator ID will overwrite the existing application with
the
> same Creator ID. Second, any databases that the application creates share
> the application's Creator ID and are automatically deleted by the system
> when the application itself is deleted.
> How do you obtain a Creator ID? For development purposes, it doesn't
really
> matter what Creator ID you use as long as you use at least one uppercase
> letter in the Creator ID. Creator IDs consisting of four lowercase letters
> are reserved for use by Palm, Inc. -- and the Creator ID doesn't conflict
> with any existing Creator IDs. But when you want to distribute your
> application, you are asked to register your Creator ID with Palm in order
to
> avoid conflicts with other applications. You can browse and add to the
> Creator ID registry at
(***http://www.palmos.com/dev/tech/palmos/creatorid).
> Whenever possible, choose a Creator ID that somehow reflects either the
name
> of your application or the name of your organization.
>
--
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/