9.6 Source Code File

In this chapter, you encountered files produced by the Cuis-Smalltalk management tools. Some come with the extension .pck.st and others with the extension .st. They both contain Smalltalk code but serve different purposes.

Files with extension .pck.st are Cuis-Smalltalk package files. They have a preamble with package information, like feature provided, version information, a description for the package and the package requirements.

Smalltalk code files can be installed by selecting them in the File List Browser and clicking on install button.

When a package is installed, its dependencies are also installed and the loaded packaged appears in the Package List tool. Package files .pck.st are created using the Packages List tool in Cuis-Smalltalk.

Files with extension .st contained serialized Smalltalk code – classes and methods. They are created when you file out a Smalltalk system category, class or method. You can serialize code in the System Browser by selecting a system category, class or method → right click and select fileOut from the context menu.

Unlike .pck.st files, .st files don’t contain any dependencies, description, or package information, only serialized Smalltalk code. .st files are around since Smalltalk’s early days, while .pkg.st were added with the Cuis-Smalltalk package functionality.

In addition to install, selecting a code file in the File List Browser also adds buttons to inspect the code and to treat code contents like a Change Sorter. When inspecting the code, a browser shows what code is different between the file and the running image and allows one to import individual classes or methods with the help of the context menu.