[Newbies] variableWordSubclass:

Joaquin Sitte j.sitte at qut.edu.au
Sun Jul 2 12:39:07 UTC 2006


Many thanks to all who replied with advice.

Here is an update on the matter for those interested.

DynamicVariable is a subclass (variableWordSubclass) of FloatArray.
FloatArray new: 2  works!
Therefore because DynamicVariable is a subclass of FloatArray
DynamicVariable new: 2 
should work, but id didn’t for me.

A partial solution to my problem was provided by Yoshiki Ohshima who
reported getting no error when executing

dv2 _ DynamicVariable new: 2

with DynamicVariable variable defined as a subclass of FloatArray.

That means I am doing something wrong. I tried to define another class
DynamicVariable2 in the same way, and do not get an error message when doing


dv2 _ DynamicVariable new: 2

Great!

But still my identically defined DynamicVariable  still does not understand
#new: (tried both Squeak 3.7 and 3.8 with identical results)

Obviously something is wrong somewhere in my system. Don’t know yet what. 


 Thanks again


Joaquin

 

Dr. Joaquin Sitte,  Associate Professor.
School of Software Engineering and Data Communication Faculty of Information
Technology 
Queensland University of Technology 
GPO Box 2434, Brisbane, Q 4001 Australia 
Phone +61 7 3864 2755 
Fax +61 7 3864 1801 
e-mail: j.sitte at qut.edu.au 
homepage http://www.fit.qut.edu.au/~sitte
 


> -----Original Message-----
> From: beginners-bounces at lists.squeakfoundation.org [mailto:beginners-
> bounces at lists.squeakfoundation.org] On Behalf Of Yoshiki Ohshima
> Sent: Tuesday, 27 June 2006 03:34
> To: A friendly place to get answers to even the most basic questionsabout
> Squeak.
> Subject: Re: [Newbies] 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
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners




More information about the Beginners mailing list