[Newbies] Adding method to Smallinteger class

Ralph Johnson johnson at cs.uiuc.edu
Fri Apr 23 20:44:15 UTC 2010

Go to the SmallInteger class in the browser and look at any method.

Type over all the text in the pane, replaceing the old method body with the
new one you want to write.   Select "accept" from the menu (or hit the
keyboard shortcut).  Note that you did NOT delete the old method, you can
still see it, but instead there is now a new method.

In general, it is better to avoid putting code in old classes, but one of
the nice things about Smalltalk is that it is easy to change old classes.
And in any case, you are clearly just trying to figure out how to put a new
method in an existing class, and this is how.

-Ralph Johnson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100423/dd499c1b/attachment.htm

More information about the Beginners mailing list