O'Reilly logo

Palm Programming: The Developer's Guide by Julie McKeehan, Neil Rhodes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The HotSync Log

The CDK provides routines that add to a HotSync log. There are several useful routines, but the main one to use is LogAddEntry.

LogAddEntry

Use this routine to add entries to the HotSync all the time.

LogAddEntry(logString, activity, timestamp)

timestamp

This is a boolean. True means that the log entry will be timestamped.

activity

This is an enumerated type. There are many different enumeration constants available for your use.

The enumerated types used most often as a value for activity are:

slSyncStarted

Tells the log that your conduit is beginning synchronization. Call the following when you begin the sync process:

LogAddEntry("", slSyncStarted, false
slSyncAborted

Tells the log that your conduit is done and that there was an error. Call:

LogAddEntry (your conduit name, slSyncAborted, false

when you finish syncing with an error.

slSyncFinished

Tells the log that your conduit is done without errors. Call:

LogAddEntry(your conduit name, slSyncFinished, false)

when you finish syncing without an error.

slWarning

Adds the specified logString to the log and tells the user at the end of the HotSync that there are messages in the log.

slText

Adds the specified logString to the log, but doesn’t tell the user about the message.

LogAddFormattedEntry

Another useful routine is LogAddFormattedEntry. It acts as a combination of sprintf and LogAddEntry and helps if you need to construct the log string from numbers or other strings. Here’s an example of its use:

LogAddFormattedEntry(slText, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required