"Bradly J. Barton" <[EMAIL PROTECTED]> wrote in message
news:12418@palm-dev-forum...
> Problem: I have a library that has several traps, including one for
> EvtGetEvent. When installing a new version of the library, if the trap is
> enabled, it crashes because the application is deleted while code is being
> executed for the EvtGetEvent...
You could protect the database, preventing it from being deleted, and
probably also keep it from being overwritten. This would force the user to
do a no-notify reset before deleting (and hopefully also replacing) the
library. Not the best solution from the user's point of view...
> Solution(?): Trap DmDeleteDatabase and watch for my library
This would be the ideal solution. I don't have any advice on how to do it;
perhaps someone else does.
You might also investigate the sysNotifySyncStartEvent and
sysNotifySyncFinishEvent in NotifyMgr. I think this was introduced in Palm
OS 3.1. This could be used to uninstall the traps and unprotect the database
before each HotSync and reinstall the traps and re-protect the database
after. This could be used to handle installing new versions of the library
via HotSync. It wouldn't handle other mechanisms such as beaming or Palm
Buddy. These would fail gracefully because the database is protected.
--
Danny Epstein
OS Engineer, Palm Inc.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/