[Newbies] variableWordSubclass:

Yoshiki Ohshima yoshiki at squeakland.org
Mon Jun 26 17:33:57 UTC 2006


> 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

More information about the Beginners mailing list