Preferences

Palm OS provides a convenient way of storing applications preferences, something similar to the Microsoft Windows registry.

iziBasic gives access to storing and retrieving such preferences. To avoid any risk of deleting other applications preferences, it encapsulates the Preferences database accesses for the current application only.

Legend:
#v|n is the Pref Number and is v|n in the range [1...999]

DELETEPREF #v|n

Deletes a preference from the Palm OS Saved Preferences database

LOADPREF(#v|n)

Returns a numerical preference

LOADPREF$(#v|n)

Returns a text string preference

SAVEPREF #v|n, v|n|c|t

Saves a preference, which can be either a numerical or a text string value, to the Palm OS Saved Preferences database

BEAMFILE c|t

Send a c|t file to another device by IrDA beaming. This file can be received by the launcher on another Palm OS platform device. It can also be accepted on a PC over IrDA.

Notes:

- Raises a FILEERROR if the operation failed, that is if the transfer did not succeed. This is the case for instance when the database is copy protected.
- Be careful that if the transfer succeeded, it does not mean that the target device kept the data!

PLAYWAVE v|n1, v|n2, v|n3

Plays a wave music with the following parameters:

- v|n1 is a wave sound ID that should be included in your resource file ("WAVE" type, see RESOURCEFILE compiling directive)
- v|n2 is the sound volume, which must be in the [0...32768] scale
- v|n3 is the synchronization mode. If set to 0, plays sound asynchronously, if set to 1 plays sound synchronously

Notes:

- PalmOS 5 onwards, and only if sound feature is present on the device. If not a file error is returned which can be trapped with the FILEERROR function

SOUND v|n1, v|n2, v|n3

Plays a single sound with the following parameters:

- v|n1 is the sound frequency in Hertz
- v|n2 is the sound volume, which must be in the [0...64] scale
- v|n3 is the sound duration in milliseconds

$ CLIPBOARDGET c|v

Gets the content of the clipboard and stores it in a variable

$ CLIPBOARDPUT c|t|v|n

Put the content of c|t|v|n in the clipboard

$ BATTERYINFO(v|n)

According to the parameter passed in v|n, returns:

  0: 1 if the device is being charged, 0 otherwise
  1: the current percentage of the battery charge
  2: the current voltage in volts
  3: the warning voltage in volts
  4: the critical voltage in volts
  any other value: returns 0

GETOSVER$

Returns the Palm OS version of the device, in the "M.m" format (Major.minor)

$ HOTSYNCINFO$(v|n)

According to the parameter passed in v|n, returns:

  0: the last hotsync date
  1: the last hotsync time
  2: the hotsync user ID
  any other value: returns an empty text string

Notes:

- returns empty text strings if the device was never synchronized

$ CALLPP$(v|n[, c|t])

Calls a PP code segment and returns a text string passed by the PP code segment to the iziBasic program

- v|n is the code segment handle and has to be in the [100...999] range (the [0...99] range is reserved for iziBasic)
- [c|t]: pass a optional text parameter to the PP segment

Notes:

- returns a file operation error (1=true/0=false) which can be read by the FILEERROR function. This can be used to know if the call succeeded

$ CALLPPARM$(v|n[, c|t])

Calls a PP ARMlet and returns a text string passed by the PP ARMlet to the iziBasic program

- v|n is the ARMlet handle and has to be in the [100...999] range (the [0...99] range is reserved for iziBasic)
- [c|t] passes an optional text parameter to the PP ARMlet

Notes:

- returns a file operation error (1=true/0=false) which can be read by the FILEERROR function. This can be used to know if the call succeeded. For instance,if the target device cannot run ARMlets a file operation error will be returned (and you can cross check with the GETOSVER$ function that Palm OS version is 5 or not).