|
Re: Laser game tutorial again: msg#00113lang.smalltalk.squeak.beginners
On Jul 21, 2007, at 8:25 AM, gruntfuttuck wrote: I'm getting three errors with the Test Runner. It would seem that a The exitSides: message looks like an accessor, a method for setting the value of an instance variable. That method would be implemented much like the assignment you give above: exitSides: aDictionary exitSides := aDictionary The preceding "self" isn't used when referring to the name of an instance variable. Accessors let other objects set the values of variables directly, and are sometimes thought to be more helpful for possible later changes. Sometimes they do things like alerting other objects of changes. When there's no behavior above and beyond simple setting, from inside the same object, their use is largely a matter of personal style. I haven't read through the whole tutorial, but perhaps the exitSides: method is defined elsewhere. In any case, I'd guess that you are correct and it is trying to do an assignment, although it may also need to do other things. Hope this helps, Benjamin Schroeder
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Laser game tutorial again, gruntfuttuck |
|---|---|
| Next by Date: | Re: Laser game tutorial again, gruntfuttuck |
| Previous by Thread: | Laser game tutorial again, gruntfuttuck |
| Next by Thread: | Re: Laser game tutorial again, gruntfuttuck |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |