[Etoys] type clash in viewer slots

Scott Wallace scott.wallace at squeakland.org
Fri Jun 6 17:01:36 EDT 2008

On Jun 6, 2008, at 1:56 PM, Scott Wallace wrote:

>>> Thus, in your example, you might decide to call that getter  
>>> "getDPI",
>>> and hence make the slot-declaration be something like:
>>>   (slot resolution 'Resolution in dots per inch' Number Player
>>> getDPI Player setResolution:)
>> This is what I did. But that still leaves the possibility of  
>> conflict open.
>> The viewer code doesn't report the conflict but simply picks up the  
>> first
>> type in the list. The blowup happens only when the affected morph  
>> is opened.
> The "getter" is the *sixth* item in the viewer spec, "getDPI", not  
> the second item, "resolution".  The thing that needs to be unique is  
> that sixth item.  If you make that unique, you'll find that the  
> types do not stomp on each other and that everything works as you'd  
> hope.

A minor, though obvious, correction.  I omitted the "readWrite' item...

The slot-spec item above should read:

(slot resolution 'Resolution in dots per inch' Number readWrite Player
getDPI Player setResolution:)

... so the getter is *seventh* item in the slot spec, not the sixth  


  -- Scott

More information about the Etoys mailing list