1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines
EricGiguere.com > Books > Palm Database Programming > Chapter 2
Printer-friendly version Set your preferences
Read my blogs on AdSense and affiliate marketing
Learn about these ads

Palm Database Programming — The Electronic Version

Chapter 2: What You Need To Know About Palm Devices

This material was published in 1999. See the free Palm OS Programming online course I developed for CodeWarriorU for some updated material.

Prev Chapter | Prev Section | Next Section | Next Chapter | Contents

Resetting the Device

At some point, an application you're developing is going to corrupt memory and crash or else freeze the device. Pressing the power button is unlikely to help, since all it does is switch from one running mode to another. At times like these you'll need to manually reset your device.

There are three kinds of reset, and you should learn how to do each one. But before you experiment, be sure to do a HotSync to backup your device's current configuration. In fact, if you don't have a dedicated testing device, regular HotSyncs will ensure that you don't lose any data if you're forced to perform a hard reset as described in the following section.

Soft Resets

The gentlest and most basic form of reset is known as the soft reset. A soft reset clears the contents of the dynamic heap and resets the operating system. The storage heaps, and hence all applications and their data, are left untouched. All applications are notified that the system has been reset, the details of which are discussed in Chapter 4.

You perform a soft reset by using the tip of a straightened paper clip to press gently into the Reset hole on the back of your device. On the newer Palm III models, the unscrewed top of the stylus can serve in place of a paper clip.

Modified Soft Resets

A step up from the soft reset is the modified soft reset. A modified soft reset also clears the contents of the dynamic heap and resets the operating system, but applications are not notified that a reset has occurred. This allows you to get the device up and running again if an application crashes while processing the notification sent by a soft reset. System patches, which are primarily bug fixes to the operating system, are also not loaded, in case they are the cause of a crash.

You perform a modified soft reset by first pressing and holding down the scroll up button and then performing a soft reset with a paper clip.

If the system crashes immediately after a soft reset, try the modified soft reset to avoid the crash.

Hard Resets

The final form of reset is the hard reset. A hard reset erases the contents of the dynamic heap and all the storage heaps and then resets the operating system. Any applications you've installed and all their data are lost  the device is in the state it was when you first took it out of its box. Regular backups will allow you to recover your data after performing a hard reset.

You perform a hard reset by pressing and holding down the power button, pushing the paper clip into the Reset hole, removing the paper clip, and then releasing the power button. You will be asked to confirm the hard reset by pressing the scroll up button. The device then wipes itself clean.

A hard reset is hardly ever necessary. You're more likely to use it to purposely wipe a device clean than to recover from a crash. One time in which you'll need to do it is to change the user name of the device. Assuming you've defined two or more user names using the Palm Desktop software, the first HotSync after a hard reset lets you choose which user name the device will use. If you only have a single device, this is useful for impersonating different users in order to fully test an application. Be sure to do a complete backup before doing the hard reset and resetting the user name. When you're done testing, do another hard reset, use the HotSync Manager to make the desktop files overwrite the handheld files, and then perform a HotSync, choosing the original user name for the device. Your device will be restored to its previous state.

Prev Chapter | Prev Section | Next Section | Next Chapter | Contents

Copyright ©1999 by Eric Giguere. All rights reserved. From Palm Database Programming: The Complete Developer's Guide. Reprinted here with permission from the publisher. Please see the copyright and disclaimer notices for more details.

If you find the material useful, consider buying one of my books, linking to this site from your own site or in your weblog, or sending me a note.

Google Web www.ericgiguere.com   
1-by-1 black pixel for creating lines
Copyright ©2003-2012 Eric Giguere | Send mail about this page | About this site | Privacy policy
Site design and programming by Eric Giguere | Hosting by KGB Internet Solutions
This site is Java-powered
Other sites: The Unofficial AdSense Blog | Google Suggest Explorer | Invisible Fence Guide | Synclastic
This page was last modified on November 17, 2003
1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines