Handling Soups in Your Application

When to Remove Soups

If you create a soup when your first soup entry is created, when should you remove it? Certainly not when your application quits--this is way too soon.

You might be tempted to remove it in RemoveScript--the function that handles deinstalling your application. Unfortunately, RemoveScript is called both when a user explicitly removes software and when a card is removed.

The DeletionScript is the best place. Make sure, however, that you ask the user before deleting the soup. Imagine a scenario where a user has version 1 of your software and upgrades to version 2. They have to delete version 1 of your software before they download version 2. If deleting version 1 deletes all their data without asking, they'll be very unhappy (and won't buy an upgrade to version 3).


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996