View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Milestone1 - Crash course in Squeak

Milestone 1 – Time to learn Squeak.

For most people, the first milestone in Squeak can be a bit daunting at first. For the first milestone we were not only expected to create all the objects and the proper messages but also provide a visualization of a family tree. This in itself was a bit overwhelming. The one thing to realize, however, is that Squeak is very powerful.

I found that once I started to learn about the system (and the language) that things were really not as hard as it seemed. The hardest part about this milestone was that the requirements wanted some type of visualization.

Coming from other languages, GUI work is usually not easy. This was one of the things that surprised me the most in Squeak. While in the beginning I was annoyed because things didn’t quite seem to work the way I expected, overall creating graphics was pretty easy.

For example, one of the first things I was able to do was create a new window. Squeak makes this relatively easy in that there is already a SystemWindow class made. To open up a new window, the following code works well:

familyTreeWindow := SystemWindow labelled: 'Family Tree'.
familyTreeWindow borderColor: (Color black).
familyTreeWindow openInWorld.
familyTreeWindow height: 600; width: 800.

The first sends the message labelled with the argument ‘Family Tree’ to the class SystemWindow. (Yes, the language is a bit confusing at first but you end up getting use to it.) The second line sets the border color to black. The third line goes ahead and opens the window. One of the things I found that was peculiar was that I had to open the window up first and then resize it for the changes to take place.

The problems I had in this milestone were not really related to programming but more toward the learning curve required for getting familiar with the Squeak enviroment. Learning to work with the System Browser is crucial. You will be spending almost all your time in this window. At the end of this project you have to learn how to turn Squeak files in. To do this you simple highlight a class category and right click and select File Out. A file out basically creates a text file that can later be imported (Filed-In). Learn to do this early and often because as good as Squeak is, it sometimes crashes. And while there are ways to recover some of your work, it is just that much easier to file out on a regular basis.

Link to this Page