Learning outcomes:
Upon completion of this lesson, the learner will be able to successfully initiate the KCroquetParticipant subclass from within Squeak.
Step by Step Guide
Note: This guide was made under OSX. If you are running Croquet under Windows or Linux, your results may vary.
1. Launch the Croquet image
2. Click on the "Scratch" project. You will be presented with a new desktop. For simplicity's sake, close all windows on this project "page."
3. Open up a workspace. Advanced users may also want to open a class browser.
3.1. To open a workspace, left click on the Squeak desktop, select "open..."-->"workspace."
Alternately, Alternately, left click on the Squeak desktop, and select "objects." You are presented with a green "Objects" window. In the "Objects" window, select "Tools" (if you receive an error to the effect of "The map on disk is more than 10 days old. Update it from the Internet?" or something similar, go ahead and select "yes"). Left click and drag the "Workspace" button from the "Tools" section of the "Objects" window onto your Squeak desktop.
3.2. Advanced users: to open a package browser, left click on the Squeak desktop and select "open..."-->"class browser" from the menu.
Alternately, from the "Tools" section of the "Objects" window, left click and drag the button labeled "Browser" onto your Squeak desktop.
4. Copy the below text and paste it into your workspace window. Don't worry about the particulars of the following script. The goal of this lesson is just to get a simple world to load.
| w |5. Now it is time to initiate the world. First, select all of the text that you just copied into your workspace.
w := KCroquetParticipant new.
w position: 50@50.
w extent: World extent - w position.
^w openInWorld
Now alt-click the selected text. You are presented with a contextual menu. Select "accept" from this menu.
Now alt-click the selected text again. You are again presented with a contextual menu. Select "do it" from this menu.
You should be presented with a dialogue stating "Enter interactivity server address, or leave blank to run your own locally." Delete the text in the dialogue's text box and select "Accept."
In a few moments, you should be presented with the below Croquet world.
6. Advanced users: You may want to investigate the code for the world that you just initiated. To do this, return to the "System Browser" window. Alt-click in the left-most pane of the window. You are presented with a contextual menu. From this menu, select "find class."
Enter "KCroquetParticipant" into the search field and select "Accept."
You are presented with the subclass "KCroquetParticipant." Discussion of this subclass is beyond the scope of the current lesson. A deeper investigation of the underlying structure of the objects, classes, subclasses, instances, and methods of the Croquet system will be presented in a future lesson.
Summary
In this lesson, the learner interfaced with the Squeak system in order to execute a script which is used to launch a simple Croquet world, based on the University of Wisconsin's "KCroquetParticipant" subclass.
Very nice - it inspired me to make a contribution.
ReplyDeleteThanks for the feedback!
ReplyDelete