Richard asked:

>Date: 17 Nov 1999 01:19:22 -0800
>From: Richard Hartman <[EMAIL PROTECTED]>
>Subject: AppInfo, AppName (x2)
>
>There are two different places to set the application
>name & the application version.  I would like a little
>clarification as to what the differences are and which
>is the proper one to use ... or perhaps how to keep both
>in sync with each other automatically.
>
>The first place is the CW Target Settings Panel -- this has
>a place for "Database Name" and "Version".  I assume that
>these are the values returned by DmDatabaseInfo().  Version
>here is an integer value.  This name, btw, is the one which
>shows up on the SwitchHack most-recently-used menu.
>
>The other place is in the Constructor, where the Project
>Settings has "Application Icon Name" and "Version String".
>This version -is- a string, you set "xyz" as easily as "1.0".
>This information is what appears to be used by the default
>launcher, when you bring up "Info" it shows this version
>and not the one from the CW Target Settings Panel.
>
>So ... are the values stored as DmDatabaseInfo() not as
>"valid" as the ones set as resources by Constructor?  Is
>there some way to ensure that the DmDatabaseInfo values
>reflect the values in the resource?  And what about Naomi?

And Danny said:

>Date: 17 Nov 1999 11:53:35 -0800
>From: Danny Epstein <[EMAIL PROTECTED]>
>Subject: Re: AppInfo, AppName (x2)
>
>At 1:33 PM -0800 11/16/99, Richard Hartman wrote:
> >There are two different places to set the application
> >name & the application version.  I would like a little
> >clarification as to what the differences are and which
> >is the proper one to use ... or perhaps how to keep both
> >in sync with each other automatically.
>
>The database name is typically the name of the application. If you don't fill
>in the "Database Name" in the CW target settings, it'll default to the name of
>the PRC file (without the PRC suffix). Since the database name is used to
>determine whether an installed database overwrites an existing one, it is
>important that all application database names are unique and that different
>versions of an application all use the same database name. The "Application
>Icon Name" specified in Constructor is often shortened enough to fit in the
>icon launcher view (as opposed to list view).
>
>The database version specified in the CW target settings is an integer. It
>should be incremented for each new release of the application: 1, 2, 3, ....
>The application version specified in Constructor is a string. It should be
>"incremented" according to your release strategy: 0.1b, 1.0, 1.1, 2.0, ...
>
>In summary, the launcher uses the resources specified in Constructor. The
>database name and version are used to determine which application to
>overwrite, if any. They are not normally exposed to the user. There is no
>system to keep them in sync. Many applications have an About dialog which
>indicates the application name and version. This makes three separate places
>which need to be updated when a new version is released.

1. The CW Target Settings panel lets you specify the name as stored 
in the database header. This is the name used by the Data Mgr in 
DmFindDatabase, and must be unique per store/card combo...which means 
that you _can_ have two versions of an app, one in ROM, and the other 
in RAM, on the same card. When this happens, the version number (see 
#5 below) is used to break ties, with the higher version number 
winning. If both version #s are the same, then RAM has priority over 
RAM.

2. Note that this database header name should _only_ contain 
characters from the 7-bit ASCII set, specifically >= 0x20 and <= 
0x7E. A side-effect of this is that localized app/panel names 
typically require that you include a tAIN=1000 resource (see 
following point).

3. The "name" of the application, as most people know it, should be 
stored in a tAIN=1000 resource. The Launcher first looks for this, 
and if it doesn't find it then it falls back to using the name from 
the DB header. The text in this resource can contain any printable 
characters from the device's character encoding, thus it can be 
localized.

4. Constructor will create the tAIN=1000 resource for you if you 
configure the Project Settings correctly. This is just a convenience, 
though. You could just as easily use ResEdit or some other resource 
editor (at least if you're on a Mac) to create the resource.

5. The version, as specified in the CW Target Settings Panel, is also 
saved in the database header. The importance of this version value is 
that it's used to break ties between two files with identical 
type/creator, if you call DmGetNextDatabaseByTypeCreator. It's also 
used by the Launcher when breaking ties between two similar DBs, one 
in RAM and the other in ROM.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200 (direct) +1 408-261-7550 (main)

Reply via email to