SmallNic: A simple result

Bill Spight bspight at pacbell.net
Sat Feb 15 18:27:14 UTC 2003


Dear Stef,

> I showed to hannes
> that tests can be used as documentation. I wnated to shared that with 
> the other documenters.

Thank you. These are very clear examples. :-)

I want to raise a related issue, if I may.

> testColorOfButtonIsGivenByWindow
>         "(self selector: #testColorOfButtonIsGivenByWindow) run"
>         "this test shows that if a button is embedded into a window using 
> addMorph:frame:
>          it  gets the color of the window"

I looked at addMorph:frame: in SystemWindow, NewWorldWindow, and
FlashPlayerWindow, and found no comments. Documentation that, it seems
to me, is quite important, but may be hard to come by, is *why* the
button (or, in my brief experience, *any* Morph), loses its own color
when added to a window. Especially in view of the fact that color
constancy is one of those things we learn early in life (by age 4).
Color constancy is so strong that it will override the physical
frequency of reflected light. Once we know the color of something, we
tend to see it that way (after age 4) even if the light coming from it
is a different hue. If it is not an accident that Morphs violate color
constancy, there should be a good reason for it. What is it?

Many thanks,

Bill



More information about the Squeak-dev mailing list