EToy programming question
Scott Wallace
scott.wallace at squeakland.org
Fri Nov 23 09:36:09 UTC 2001
Hi, Joshua,
It would appear that in your implementation of Player.getLevel, you
forgot an "^", which is why it's returning a player (i.e. self)
rather than a number.
-- Scott
At 2:10 AM -0500 11/22/01, Joshua 'Schwa' Gargus wrote:
>Hi,
>
>I have a Morph subclass that I would like to add a numeric get/set slot to.
>I tried defining the following method on the class side:
>
>
>
>additionsToViewerCategories
> "Answer a list of (<categoryName> <list of category specs>) pairs
> that characterize the phrases this kind of morph wishes to add to
> various Viewer categories."
>
> ^ #((multiresolution
> (
> (slot level 'Set the level of detail to view at'
> Number readWrite Player getLevel Player setLevel:)
> )))
>
>
>
>When I bring up a viewer on the morph, I see a get/set slot, but its value is
>'an UnscriptedPlayer (1062) named MultiresolutionCurve' instead of a number.
>I should also mention that I defined #getLevel and #setLevel: in Player.
>
>Does anyone (Scott) have an idea about what is causing this behavior, or how
>to fix it?
>
>Thanks,
>Joshua
More information about the Squeak-dev
mailing list
|