Hans,
        You are right -- NO memory is allocated for the prototype. 
You must assign to the prototype in order to avoid a very dangerous 
situation.  In Pepsi as an example:

FreeCell : Object (board cardsRemainingDisplay gameNumberDisplay state)

[FreeCell := FreeCell new]

Note the second line that assigns to the FreeCell prototype again. 
Once you have done this, the prototype has memory and everything is 
OK.

I am lobbying Ian hard to do this automatically.  There is no reason 
to leave this giant trap waiting for every programmer to fall into it.

My goal is, "Yes, you can crash the program, but you must do 
something really stupid to make it happen."

--Ted.

At 4:55 PM +0200 5/15/07, SainTiss wrote:
>Hi all,
>
>When using define-type, is memory somehow allocated for the slots of the just
>created prototype?
>


-- 
Ted Kaehler         http://www.squeakland.org/~ted/
(home) 3261 Montecito Drive, Las Vegas, NV 89120.  voice (702) 456-7930
There are worse crimes than burning books.  One of them is not 
reading them.  --Joseph Brodsky, writer
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to