[Newbies] Best way to implement two-dimensional array

John Almberg jalmberg at identry.com
Tue Sep 4 21:14:25 UTC 2007


Right, so if classes are factories that produce objects of a certain  
kind, then I've just changed the factory, and potentially it's  
products, interactively.

That's pretty cool. I get it!

-- John


On Sep 4, 2007, at 4:49 PM, Bert Freudenberg wrote:

> Seems you've made the first step to truly understanding Smalltalk :)
>
> Also you must realize that the browser is just a view into that  
> live system of objects we call classes and is simply modifying  
> those live objects. You could do that in an inspector as well, but  
> the class browser is more specialized so it is easier to use for  
> that purpose.
>
> Welcome to Real Objects.
>
> - Bert -
>
> On Sep 4, 2007, at 12:19 , John Almberg wrote:
>
>> Whoa... that worked, but the implications are a bit hard to digest...
>>
>> So MyClass is an object in my Smalltalk image, and it can have  
>> variables that I can set interactively, and the values contained  
>> therein are now part of the class...
>>
>> I keep reading that classes are objects, but this is the first  
>> time I've seen something that makes me realize that they are  
>> fundamentally different than objects in other languages. I guess  
>> because they are 'live', in some sense, in the Smalltalk  
>> environment. That is, not just source code, but an instantiated  
>> object.
>>
>> Talk about paradigm whiplash... I'm going to have to think about  
>> this, a bit :-)
>>
>> Thanks!
>>
>> -- John
>>
>>> Type "MyClass", select it, press Cmd-i (or Alt-i). You get an  
>>> inspector on a class - which of course is the instance of another  
>>> class, as everything is an object (and hence an instance of a  
>>> class) in Smalltalk. Anyway, you should see a reference to the  
>>> superclass, a dictionary of all the methods, the list of instance  
>>> variables and subclasses etc. Class variables are simply held in  
>>> a Dictionary in the "classPool" instance variable of that class.  
>>> So by inspecting that and drilling down into your class var you  
>>> can modify it.
>>>
>>> A simpler way to get at the contents of your class var is just  
>>> selecting its name in a browser showing any method of your class,  
>>> and press Cmd-i there. That works because in the browser, code is  
>>> evaluated in the context of the selected class.
>>>
>>> - Bert -
>
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Websites for On-line Collectible Dealers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Identry, LLC
John Almberg
(631) 546-5079
jalmberg at identry.com
www.identry.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the Beginners mailing list