logo       

Re: variableWordSubclass:: msg#00128

lang.smalltalk.squeak.beginners

Subject: Re: variableWordSubclass:

Joaquin,

> I wish to create a subclass of FloatArray for a dynamic system simulation.
> When creating the class with #subclass: the
> method is automatically changed to #variableWordSubclass: as follows
>
> FloatArray variableWordSubclass: #DynamicVariable
>
> That is fine. But when I wish to create an instance
>
> dv2 _ DynamicVariable new: 2
>
> I get an error telling me that #new: is not understood. However #new: is
> understood by the superclass #FloatArray. Why?

I tried this and didn't get any error. I managed to create an
instance of DynamicVariable with two slots.

> And, by the way, the method #variableWordSubclass cannot be found with Method
> Finder. Why?

I'm not sure how you did this, but if you select from the "v" to "s"
above and press Ctrl-w (or Alt-Shift-w), you'll see the selectors that
contains the selected string as a part.

-- Yoshiki


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise