[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a whimsical question

   > > What was the reason for choosing the name "mirror"?
   > When a circleMorph sends a message to itself, it "sees" a circleMorph. This is
   > fine, most of the time. But what if you need to manipulate the object as
   > a bunch of slots instead? The answer is to create a special object (the mirror)
   > that lets us reflect on the internal structure of the original object.
   > So it is more of an X ray machine than a mirror, but I hope you get the
   > idea.

Thank you for the explanation. I read the section "Behaviorism vs Reflection"
of the Reference manual with interests. In the real (or conventional world)
self and mirror might be different SYSTEMS... (multiprocessor etc?)

BTW, what is the easiest or elegant way to add a slot, which contains
a method, to an object without using the outliner?

   anObject _AddSlots: (| aSlot <- ??method?? |) ?

Is this too much a reflective way? In so doing, I have some troubles in
the updates of objects (in a recursive use of AddSlots)..

   anObject _AddSlots: (| aSlot <- ( anotherObject _AddSlots: ( anotherSlot <- ??anotherMethod |) ) |)
(??method?? ??anotherMethod??= e.g. anObject copy etc.)

A layman's question again.