I am probably the only person in the world who hasn't known about this for years, but I have never seen the second part of this posting written down anywhere. When I discovered it, I thought it was pretty neat, so I decided to post it just in case someone finds it useful.
EXTENDING A CLASS
Probably everyone knows that you can extend an existing Alice class (or do something very similar to extending a class) by doing the following:
* Create a new world.
* Add an object from the gallery into the world.
* Select the object in the object tree and select the methods tab below the property tree.
* Write one or more new class-level methods for that object.
* Declare some new class-level variables (properties) for that object if needed.
* Right click on the object in the object tree and select the "save object..." item in the popup menu that results.
* Specify the name and location for the new file that represents the new class in the dialog that pops up. Don't change the default extension for the new file, which is a2c.
ADDING THE NEW CLASS TO THE GALLERY
This is what I haven't seen written down anywhere. I discovered and confirmed experimentally, that you can add your new class to the gallery simply by copying it into one of the sub-directories of the directory named Alice\Required\gallery. If you do that, it will appear in the gallery with a thumbnail similar to that shown in the attached image with the question mark.
ADDING A NEW FOLDER TO THE GALLERY
Taking this concept even further, you can create a new folder to be used as the repository for new classes in the gallery by creating a new directory as a child of the directory named Alice\Required\gallery. Then you can store your new classes in that folder. For example, the attached image with the picture of the file folder shows the thumbnail for a new folder in the gallery named A-Custom.
This makes it easy for you to create a library of new classes and easily add objects of those new classes to your worlds simply by following the normal procedures for adding objects from the gallery. With this approach, you don't need to use the "Import..." item on the File menu to add an object of a new class. Among other advantages, this means that you can drag a new object directly from the gallery and drop drop it in a specific position in the world.
BE SURE TO KEEP A BACKUP
Be aware, however, that if you later find it necessary to re-install Alice 2.0, your new folder may not be there following the installation. Therefore, you should include that folder in your daily backup routine so you will have it available to be copied back into the gallery if needed. (You do have a daily backup routine, don't you?
IS THERE ANY DANGER IN DOING THIS
There is always a modest danger in modifying anything about a program and its disk structure that was designed by someone else. However, the danger seems to be pretty benign in this case. About the worst thing that could happen is that you might have to reinstall Alice 2.0, which is the easiest program that I know of to install under Windows.
Dick Baldwin