From: "Tom Frauenhofer" <[EMAIL PROTECTED]>
> A trick that I use is to put a version number in the preferences for the
> application.[more good stuff about versioning data snipped]
> The down sides is you will have to support all of these upgrade routines
> for a fairly long time. You'll also have to consider those who jump up
> multiple versions (the customer is upgrading from version 1 to version
> 5).
In practice, I've found this to be less onerous than I thought. My
"UpdateVersion()" routines tend to look like this:
if (version < 5)
sorry, tell them they're too out of date
if (version < 6)
upgrade 5 to 6
if (version < 7)
upgrade 6 to 7
...
At every version, I add a new if-statement at the end, and, every so often,
I delete a bunch and increment the "sorry" version number at the top.
This is clearly not the most efficient way, but it lets me maintain
data-compatibility between versions very easily (instead of having to think
of the most efficient way, .e.g., to update a version 2 user to the version
17 format...)
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/