POSE is the Palm OS Emulator, and it is available from the Palm Computing Developer Zone. It was originally created by Greg Hewgill and was then tacken over by Palm Computing. Once you've downloaded and installed it, what you have is an emulator that can't do anything yet. You need a ROM for it to use. There are two ways to get a ROM. If you are a Palm owner, the emulator comes with a
PRC
file that will download your ROM to a file that can be used with POSE. The benefit to getting your ROM this way is that the emulator will be running exactly what your Palm is. This makes it a really good testbed. The other way is to download a debug ROM from Palm Computing. There is a license agreement you have to accept, but I don't believe it is anything earth-shattering. I've not read it, since I have a Palm V, but I know others have used that route to get a ROM.To download the ROM from your personal Palm, install the
Transfer.prc
file from the POSE distribution onto your Palm. Then run the emulator, and select the "Download ROM" option. Follow the directions on downloading that pop up. Once you've completed this step, go through the setup of POSE to customize it for your setup. Mine is a Palm V, with 2Mb of memory. Once you get it setup, it should look something like the image below. You won't have everything that I do, such as the KVM, but most of it should be the same.![]()
In order to test our application, we need to install it on the emulator. But first, we need to install the MathLib.prc file. Without this loaded, our application won't work. To install it, right-click on the emulator, select "Install Application/Database..." and then navigate to wherever you put the MathLib package. Double-click on the MathLib.prc file to install it. Now right-click anywhere on the POSE window, select the "Install Application/Database" menu, and then the "Other..." menu item. Navigate to your project directory and double-click on your
ManHourCalculator.prc
file. You will see a progress meter during the load, and then it will look like nothing happened. Sometimes the display does not refresh itself properly, and you need to force a repaint. To do this, click on the "Security" icon, or one of the others, then click on the Application silk-screen button to return to the main apps page. You should now see a new icon for our app, with the name set to "ManHour...". Click on this, and you should see the following screen:![]()
If you get something different, you've made a mistake. If you saw a flash, and were then returned to the apps panel, you probably forgot to override the
Smalltalk class>>start
method. If you got some odd error message, and then a debug walkback, you probably have some sort of error in error inManHourCalculator>>initialize
,ManHourCalcualtor>>createComponents
orManHourCalcualtor>>createMenus
. Go back and look at your code in the class browser and verify it against the previous sections of this tutorial and then come back here.If you see the screen above, then you are in good shape so far. Click on the text field next to the label "How many hours?" label and then type in 20. (Of course, if you are actually running this on a Palm, you would graffiti the numbers instead of typing.) Now click on the "Calculate" button. What happened? Did you get the value 20.0000 in the "Adjusted Hours" field like this:
![]()
No? Then what sort of error message did you get? Your problem most likely lies in the
ManHourCalculator>>calcButtonPressed
method. Again, compare your version to that in the previous sections. If you got the answer 20.0000, then try clicking on the popup list next to the "How sure are you?" label, and select "Somewhat."![]()
You should see 30.0000 appear as the adjusted hours.
![]()
And if you select "Not at all", you should see 40.0000 as the adjusted hours. If any of these fail, go back and look at your
calcButtonPressed
method.Now let's try out our menu. Press the menu key
![]()
and you should see the menu popup at the top of the screen.
![]()
You should get the About box that we defined in our resource file. It should look something like this
![]()
Click on the OK button to return to our main form. Selecting "Exit" form the menu will return you to the PalmOS apps panel.
If all of this has worked, congratulations! You have just written and tested your first Pocket Smalltalk application. You can take that same
PRC
file (and the MathLib.prc file) and install it on your Palm using the Palm Desktop installer and show it to your friends.