Next, you can play around with VisualWorks -it is fairly easy for
simple applications- and study the RAGS source code, starting from
the class comments. Start from the agent and observer specification
mechanisms and leave aside interfaces definition and management.
Go to step 7 below.
2. Put the RAGS sources (rags.sou) on a new directory (suppose it is called `rags').
3. Open the original `visual' image and edit the path of the system sources and changes with respect to your file organization (use the "System Workspace" window for that purpose).
4. Save the image ("Special"menu on the "Launcher" window). Now, you have a clean, working Smalltalk/Visualworks image on your computer.
5. Open a "Workspace" window (from the "Utilities" menu on the
"Launcher" window), type the expression
6. Save the image with a new name, for instance 'rags.im'. You will have to repeat the last two steps on a clean image every time you need to reinstall your RAGS image (either because it has become unusable due to memory saturation or in order to upgrade the system etc.). This is one of the reasons why having a clean original visual image is handy.
7. To run the demo, type and evaluate the expression "Demo startDemo" on a workspace (or any other window). This will invoke the class method "startDemo" of class "Demo" (you can view and/or edit "Demo" and associated classes code in the "Demo" class category using a Smalltalk system browser as usually).
8. The "Demo" category has been created with the aid of the RAGS application development tools (see documentation), for example, once the basic "Demo" class was created, we simply invoked "Demo edit" to open and edit all attached agents/world/etc. specifications. Application developers may follow the same procedure to create their own simulations.
Smalltalker's trick : As long as you are in a learning phase, avoid saving your image on exit. You can keep the code you developped in a separate output file (by saving the new classes, categories or methods from a browser, for instance).
Developper's trick : Avoid modifying the existing Smalltalk or
Visualworks source code. Try to subclass instead.