Unmatching methods/calls.

Bert Freudenberg bert at impara.de
Wed Apr 27 08:47:01 UTC 2005


Am 27.04.2005 um 02:56 schrieb David T. Lewis:

> On Tue, Apr 26, 2005 at 04:26:14PM +0200, François THIMON wrote:
>> Hi.
>> Something really annoying in squeak is you often find invokations of 
>> methods
>> that don't exist. Just to give some examples, I found : WriteStream 
>> on:(String
>> new:128) in XMLTokenizer class but though, no on: method is present 
>> amongst the
>> static methods of WriteStream. I also found some examples in socket 
>> classes that
>> I needed to correct by myself to get them to work.
>> Why isn't there any method available in XMLParser? They do but call
>> subclassResponsibility!
>
> Hi François,
>
> I think that perhaps you are more familiar with Java. In Smalltalk, the
> "static" methods are really just methods in the class of the object, 
> and
> there is no need to reproduce them in every subclass. Classes are real
> objects, and the normal method lookup works the same for methods in the
> class as it does in for methods in the instance.
>
> There is no such thing as "static" in Squeak, practically everything is
> dynamic :)

Use the "Protocol Browser" to see each and every method that your 
object or class responds to, even if implemented in a super class 
(press cmd-p in the class list, or use the menu).

- Bert -




More information about the Squeak-dev mailing list