Thoughts from an outsider

Ramon Leon ramon.leon at allresnet.com
Fri Sep 1 01:15:05 UTC 2006


> Sometimes I forget what it's like to be a newbie, too, but 
> sheesh!  :-) (pardon me if you're not so new, Stephen, I 
> haven't been reading squeak-dev extremely closely)
> 
> In case "edit the code" wasn't enough of a hint, here's how I 
> figured it out:
> 
> - browse to SystemWindow
> - with the 'inst var defs...' menu item, find all of the 
> places that the 'borderWidth' instance variable is set
> - hmm, #borderInitialize looks promising, so browse to it
> - see that the initial value is defined by #defaultBorderWidth
> - override the implementation of #defaultBorderWidth, and you're done!
> - open a browser to test it out
> 
> Rats!  It didn't work.  OK, let's debug...
> 
> - inspect the result of 'SystemWindow new' in a workspace.  
> Yep, borderWidth didn't change.  Why not?
> - highlight the expression again and choose the 'debug it' menu item
> - step into the expression and see that the first message 
> sent is #hasPrototype.  Sounds suspicious!
> - select 'self' in the lower-left debugger pane, and choose 
> 'inst var defs...' from the menu to see who defines 'prototype'
> - there's a prototype message; let's clear the prototype with:  
> 'SystemWindow prototype: nil'
> 
> Now it will surely work!  But it doesn't.  To make a 
> medium-length story short, SystemWindow>>initialize stomps on 
> the value that had been properly set by the superclass.
> 
> I suppose that this is because I didn't load LookEnhancements 
> first; otherwise, the above would probably work.  But I don't 
> care enough to try.  BTW, this is in a Croquet image that's 
> basically 3.8 as far as Morphic is concerned.
> 
> Anyway, I guess I've shown that it's not completely trivial.  
> Even if I had loaded LookEnhancements first, it seems likely 
> that the prototype problem would have arisen.  Hopefully 
> someone learned something about Squeak debugging.
> 
> Cheers,
> Josh
> 


Wow, I didn't realize I was so unclear, my bad.  First, load
LookEnhancements, then go to SystemWindow, there is an accessor on the class
side called borderWidth, edit it, change it to 4.




More information about the Squeak-dev mailing list