Goodies and Changesets
Last updated at 11:01 am UTC on 11 August 2018
Q: What are goodies anyway? Changesets??
A: Goodies are a nickname for "filed out" pieces of code, that you can add to your system ("file in"). These goodies can be objects, or changes. They make it extremely easy to distribute enhancements or changes to a Squeak image. Goodies usually are in the form of ChangeSets (see below).
Goodies/changesets might be considered as a rough equivalent to "programs" in traditional programmer terminology as added to a specific release which then would be considered to be the runtime system plus the library.
A goodie may also be considered to be a simple "package"... see FAQ: Squeak Packages. It then is probably rather distributed as a Monticello package.
Goodies are not a unique Squeak product; every Smalltalk uses them. It is even possible to exchange code between different Smalltalks this way. This is of course only possible if your code doesn't depend on other objects that are specific to Squeak.
Q: How do I import goodies/changesets/programs into my image?
A: From the World Menu select "open..." and "file list". Choose the path and filename of the .st or .cs file in the upper-right pane. In this same file list pane, bring up the pop-up menu (middle mouse button) and choose "file into new changeset" to import all the code into your image. (If the goodie ends in .cs.gz or .st.gz, you will need to decompress it first with the "decompress to file" menu item.)
Once you've saved your image from the world menu, all filed-in changes are made persistent to your image.
see also: Installing DosFileDirectory.je.2.zip step by step
Q: How do I execute or "run" a goodie/changeset after it has been imported?
A: Some changesets might simply make changes or improvements to something that already exists in the Squeak image. Loading the changeset (as described above) will cause it to take effect.
Other changesets might be standalone applications which you need to start up. Normally, a proper changeset will include instructions in its comment ("preamble"), which will tell you how to start it up. For example, it might say to execute the code snippet "SuperBrowser open" to start the application.
If the changeset application does not include instructions, you may need to open a Browser and look at the classes in the application, to find what looks like the fundamental class. This class may have a class-side method such as "open" or "new", which will start things up.
Q: How do I create my own goodie?
A: You can make different types of goodies: from a collection of classes, from one class, and even from a method of a class. But you can also make a goodie of your changes.
To make a goodie of a collection, class or method, open it in a browser, and choose fileOut from the menu. You will find a .st file -the goodie- in your directory.
But the more typical thing to do is to make a goodie of your changes (a "ChangeSet"), you just have to manage them correctly. Most Squeakers use changesets to handle their goodies/programs/applications written in Squeak, so it's useful to learn. Select "changes" from the World menu to view your options. The most common method is to open a simple change sorter, rename the currently Unnamed change set to a name that you'd like, and then select "file out". This will create a .cs file containing all of the programming changes you've made in Squeak. See FAQ: Change Sorters.
See also Working with change sets and FAQ: Squeak Packages.
Link to some Goodies and ChangeSets
Squeak Fixes Archives is a list of fixes, enhancements, add-ons... gleaned from the Squeak mail list.