On Sun, Jul 08, 2007 at 06:18:54PM -0600, Chuck Smith wrote:
Great I got the message on how to do the subclass but how do you create a new protocol? tests etc etc In the tut on game.
Sorry if I am a pain but I would real like to learn this and the game tut is got me very interested. Any help is great
Your comments are very useful. After a while, one forgets what it is like to be new to something. Thanks for reminding us. Here is my addition to the tutorial that answers your question. It is meant to go in between the two images at http://squeak.preeminent.org/tut2007/html/015A.html
To help keep classes organized, Squeak provides method categories for each class. Method categories are sometimes called protocols. Create a new protoocol called tests. Right-click on the third pane (the protocol list), and select <i> New Category -> new... </i> Enter the name "tests":
http://img472.imageshack.us/img472/3130/042aox0.jpg
Now, create a method called testCellOnState. Like with class creation and editing, we do this by editing the code in the lower pane:
Stephan: could you add this to the tutorial? I had named the screenshot 042A.jpg in keeping with your naming convention, but imageshack changed it.