Squeak3.10.gamma.7159
The following code gives surprising results: -- / | window pasteUpMorph | (pasteUpMorph := PasteUpMorph new) color: Color green. window := SystemWindow new. window addMorph: pasteUpMorph frame: (0@0.1 corner: 1@1). window openInWorld./ -- The result is a SystemsWindow with all submorphs green except the pasteUpMorph, which is white!
The offending statements are in SystemWindowaddMorph: aMorph fullFrame: aLayoutFrame /aMorph adoptPaneColor: self paneColor. aMorph borderWidth: 1; borderColor: Color lightGray; color: Color white.
self paneColor/ has surprising side effects. - It sets set the SystemsWindow property: paneColor->pasteupMorph color. (i.e., green) - It sets the color of all SystemsWindow submorphs to the new color (i.e. green) /aMorph borderWidth: 1; borderColor: Color lightGray; color: Color white. /simply sets the color of the pasteUpMorph to white.
The result is that /ScrollPane>>example1/ and any other simple use of /ScrollPane /don't work properly. I fixed the problem by setting the SystemWindow>>paneColor early: / // | window pasteUpMorph | (pasteUpMorph := PasteUpMorph new) color: Color green. window := SystemWindow new./ _/window paneColor: Color white./_ / window addMorph: pasteUpMorph frame: (0@0.1 corner: 1@1). window openInWorld./_//_
Enjoy --Trygve
squeak-dev@lists.squeakfoundation.org