Stuff I Like: Object Library for Palm OS
Installment two focuses on the C++ framework called "Object Library for Palm OS", or POL for short. This comes from a Ukranian company called TeT.
The structure of this library is familiar to Windows programmers that have used MFC. You have a core application class, classes that wrap all of the UI controls, an event mapping mechanism, and a variety of utility classes.
Using a combination of classes and macros, they provide a base application class, CPalmApp, that you inherit from to implement your application. You can customize startup, the event loop, and shutdown by overriding methods. The default event dispatch mechanism uses special event mapping macros that quickly encode what events you want to catch and dispatch them to methods of your form classes.
CDatabase and CRecord classes make manipulating Palm OS databases easy. CString provides a good general purpose string class, and there are containers for holding small amounts of dynamic data.
The documentation for POL is quite good. They provide a CHM (Windows HTML Help) file that describes each class and of its members, plus it has an introduction to the library and a hierarchy chart. Full source code is provided for the library, and they have an online user forum monitored by TeT employees.
As a test of this library, I built up a survey application for Metrowerks internal use. I started by designing all the forms in Constructor, then I took the POL stationery project and added my forms to it, one by one. Adding a form requires adding a map entry to your application class, then adding a new class overriding CForm. Since the framework provides most of the glue code, implementing a form is quick, with you only needing to write a few map macros and some methods for each specific event you want to handle.
You can find out more about the library at http://www.tet-soft.com/pol/ and http://www.aqpoint.com/pol/.
Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.
The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

qwertYAK / frobnovich
|