Prevent cloning of clones
Adde
adde at trialcode.com
Mon Apr 25 05:56:59 PDT 2005
I'm trying to create a representations for different units of
measurement in SVG and the best i could come up with was the following:
SVG addPrototype: #Unit derivedFrom: {Cloneable}.
SVG Unit addSlot: #postfix.
SVG Unit traits addSlot: #Pixels valued: (SVG Unit clone `>> [postfix:
'px'.]).
u@(SVG Unit traits) toXML [ u postfix ].
However, there is no point in doing 'SVG Unit Pixels clone' so I was
wondering how I can make it behave like numbers, ie. '1 clone' gives an
error message.
/Adde
More information about the Slate
mailing list