[Etoys] type clash in viewer slots

Bert Freudenberg bert at freudenbergs.de
Fri Jun 6 04:33:35 EDT 2008


On 06.06.2008, at 07:55, K. K. Subramaniam wrote:

> Hi,
>
> I had a viewer spec for #input category for a new Morph
> 	slot resolution 'Resolution in dots per inch' aNumber Player  
> getResolution
> Player setResolution:
>
> This code worked fine in Squeakland image but failed in Etoys image.  
> Etoys had
> another slot with the same name in VideoMorph so the type returned  
> for my
> slot was incorrect - there was no warning of a clash. I had to change
> resolution to dpi to get the code to work.
>
> I thought a slot is a visual wrapper for a property. Why should its  
> name be
> unique across classes? Is this a bug?


Because the Etoys object model has no classes. It uses a "fat" object  
model, all methods are in the Player, and Player is the only type of  
object in the Etoys philosophy. Only depending on which costume the  
player currently wears are some methods hidden in the viewer.

So it is not a bug but a conscious design decision. Extensibility was  
not high on the requirements list.

- Bert -




More information about the Etoys mailing list