Palm OS Programming With NSBasic (cont.)
Final Steps
The final steps involve actually drawing the rectangle, circle or line. We use a series of if-then statements to determine if either
the circle or rectangle check boxes are selected. If either of them has been selected, we draw the appropriate figure. If not, we draw a line.
When we are finished typing the code, it's time to compile and run the application on either the Palm OS emulator (available from
www.palm.com) or an actual device. Either way, the basic steps are the same. Select
Build | Generate from the menu at the top of the NSBasic IDE. It will download your compiled prc file to C:\NSBasic\Download unless
you changed this during installation. To run the application, you will need to install the NSBasic runtime files (NSBRuntime.prc and Mathlib.prc),
and your compiled prc file. The final program should output something similar to Figure 6.
Download the application with the NSBasic runtime
Figure 6: The App In POSE
Although this was a relatively simple example, you can see how easy and powerful NSBasic is. If you're a
developer looking for an easy way to write applications for Palm OS devices, you should definitely check this out.
Other Resources
Palm Computing
Palm OS DevZone
NSBasic
WirelessDevNet.com Training
|