Palm Programming

OnboardC is a complete C programming environment for your Palm. The source editor, resource editor and compiler all run on your Palm so you can develop on the move.

Handheld Basic++ (HB++) is a very nicely designed visual basic development environment.

The Palm Programmers Cookbook describes the basics of programming for Palm and contains examples for creating various user interface objects like forms, buttons, menus, and tables.

The Palm Alternatives to C page describes options for different languages that can be used for programming the Palm. It also benchmarks the resulting code. OnboardC is in a respectable 5th place beind CodeWarrior, HB++, PP and High Speed Pascal.

The Palm OS Development FAQ Wiki is still a bit sparse but with help it could turn into a very useful repository of development information.

The Palm OS API Reference describes in detail every function built into the Palm.

Mathlib
To use trigonometry functions like sqrt(), sin(0 and cos() in your C programs you will need a library called Mathlib. Use the following steps to use it with OnboardC

  • Download the Mathlib.src.zip file.

  • Uncompress the file and take a look at the documentation.
  • Install MathLib.prc on your handheld.
  • You’ll also need to get the source files MathLib.c and MathLib.h on to you Palm. Use a DOC file converter such as DocReader or PigyDoc to create a PRC file for each of the source files and install these on you Palm.
  • Delete the line #include from the top of MathLib.c
  • Add #include "MathLib.h" to the start of your application source file.
  • Add the following code to your startApp() function

    static void startApp(){
    Err error;

    error=SysLibFind(MathLibName,&MathLibRef);
    if (error)
    error=SysLibLoad(LibType,MathLibCreator,&MathLibRef);
    if (error) FrmCustomAlert(DebugAlert,"Can't find MathLib.","","");
    error=MathLibOpen(MathLibRef,MathLibVersion);
    if (error) FrmCustomAlert(DebugAlert,"Can't open MathLib.","","");
    return;
    }

  • Add the following to your stopApp() function

    static void stopApp() {
    Err error;
    UInt16 usecount;

    error=MathLibClose(MathLibRef,&usecount);
    if (error) FrmCustomAlert(DebugAlert,"Can't close MathLib.","","");
    if (usecount==0) SysLibRemove(MathLibRef);
    return;
    }

Forums
1src has a lot of useful forums related to programming on various handheld devices including the Clie
PalmOpenSource may also have some useful information

This entry was posted in Programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *