Method Category Pane?

Stephane Ducasse ducasse at iam.unibe.ch
Sun May 25 08:10:50 UTC 2003


On Sunday, May 25, 2003, at 08:26 AM, Joel Shellman wrote:

> Please excuse my newbie questions, I'm trying to read and get up to 
> speed
> ASAP.
>
> I'm new to smalltalk and reading through:
>
> http://coweb.cc.gatech.edu:8888/squeakbook/uploads/noel.pdf
>
> and on page 12 it says the third pane in the System browser is the 
> "method
> category pane". I thought that was the list of protocols. Are those
> synonymous?

Yes the third pane is just a list of folders (method categories or 
protocols = same stuff)
to help you find your information.

>
> Also, it says that those categories are for human readability only, 
> but I
> thought I read something that said that different objects/classes could
> support the same protocol. Ie. a Car could support the driveable 
> protocol
> just as the Bicycle could.

Yes

> If I create a driveable protocol on Car and then
> use it on Bicycle, are those the same protocols, or are they 
> different? ie.
> given the FAQ entry about finding all classes with a certain protocol:
>
> http://minnow.cc.gatech.edu/squeak/48

A protocol is just a set of message that an object can understand. So 
if you
define the same message = method-***name*** then your objects 
(instances of those class)
will be able to receive the same message.

For example we can open a window or open a file, the operations are 
different but they have the same name.
This is what is named ad-hoc polymorphism because there is not too much 
in common.

Now if you have a window and a colored window we can easily image that 
there are a lot in common.
But the way have you got a look at the draft of the book for novices 
I'm finishing
to write. http://scgwiki.iam.unibe.ch:8080/StephaneDucasseWiki

Contact me if you want to get more recent versions ;)

> That's just a string search that doesn't actually mean anything. In 
> other
> words, two classes could be in the list returned from that call, but 
> they
> could be completely unrelated. Is that correct?
>
> Thanks!
>
> -joel shellman
>
>



More information about the Squeak-dev mailing list