From sheridan at sheridan-mahoney.com Wed Feb 23 02:52:56 2011 From: sheridan at sheridan-mahoney.com (Sheridan Mahoney) Date: Wed, 23 Feb 2011 01:52:56 +0000 (GMT) Subject: [sbe-discussion] errata for Morphic chapter - CrossMorph loses its shape References: <488412363.323970.1297972905554.JavaMail.mail@webmail07><892C020A091B894AB75890CFE9E6669ED6C83A@exchange.int.1sttechcu.net><949480485.396477.1298419182564.JavaMail.mail@webmail12> <892C020A091B894AB75890CFE9E6669ED6C88B@exchange.int.1sttechcu.net> <323277596.396944.1298421982330.JavaMail.mail@webmail12> <892C020A091B894AB75890CFE9E6669ED6C892@exchange.int.1sttechcu.net> Message-ID: <1218875603.397546.1298425976378.JavaMail.mail@webmail12> Hi there, I've been working through chapter 11 on Morphic, and have come across what is either a bug in Pharo, or a problem with the way CrossMorph is defined in PBE. The problem occurs both with the 1.0 image provided by the PBE website, and with the latest 1.1.1 image available from the Pharo website. I was hoping someone with knowledge of Morphic could give me some feedback. The code is from pages 223-227. Basically, a CrossMorph is created by first creating a horizontal bar, and then a vertical bar. Then, CrossMorph is enhanced to be able to respond to mouse events, specifically the arrow keys in this case. I found when I used the arrow keys with a CrossMorph object, the CrossMorph lost its shape. If the CrossMorph was made to move with the right or left arrow keys, the vertical portion moved correctly but the horizontal portion left a shadow behind that was the same height and color as the horizontal bar. If the up or down arrow keys were used, the horizontal part moved correctly, but the vertical part left a shadow behind, the same width and color as the vertical bar. I'm using: Pharo image: PBE.image Virtual machine used: Squeak-4.4.7.2357-linux_i386 Class browser used if applicable: OBPackageBrowser Operating System: Ubuntu 10.04 Lucid Lynx Many thanks for any feedback, and Cheers, Sheridan