Hi 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
I think the the expression "ArrayedCollection subclass: #DynamicVariable" is the right way you get a subclass of FloatArray.
FloatArray variableWordSubclass: #DynamicVariable
That is fine. But when I wish to create an instance dv2 _ DynamicVariable new: 2
So far I've seen the hierarchy of FloatArray the method "new:" isn't on the class side anywhere. This is the reason because you get an error.
Hope this helps.
Cheers, Frank
hi-
So far I've seen the hierarchy of FloatArray the method "new:" isn't on the class side anywhere. This is the reason because you get an error.
i'm a real rookie here, but what does it mean - "new:" isn't on the class side anywhere? where is "new:" then?
john cummings
Hi John,
So far I've seen the hierarchy of FloatArray the method "new:" isn't on the class side anywhere. This is the reason because you get an error.
cre> i'm a real rookie here, but what does it mean - "new:" isn't on the cre> class side anywhere? where is "new:" then?
if you can't find new: up the hierarchy the things to look for are metaclsses and the class Behaviour. In the free books Stephane Ducasse collected Hopkins Horan provides a chapter on this topic.
It's a bit brain twisting and when reading I decided I could get by without really knowing about this detail :-))
Maybe someone else can shed more light on this, otherwise retry on squeak-dev.
Cheers,
Herbert mailto:herbertkoenig@gmx.net
dv2 _ DynamicVariable new: 2
So far I've seen the hierarchy of FloatArray the method "new:" isn't on the class side anywhere. This is the reason because you get an error.
#new: is implemented in Behavior which is the superclass of Class.
FloatArray new: 5
is correct for example
beginners@lists.squeakfoundation.org