Thoughts from an outsider
Josh Gargus
schwa at fastmail.us
Fri Sep 1 01:11:32 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
On Aug 31, 2006, at 7:33 PM, Ramon Leon wrote:
>> Thanks for this list.
>>
>> Call me stupid, but I can't figure out what to do to "change
>> SystemWindow borderWidth to 2". Can you give me a hint?
>
> Literally, I meant, go there and edit the code, from 4 to 2. The
> default
> borders are far too fat and make squeak look silly.
>
>> Also, is there a way to get rid of the shading of background
>> windows - rather just shade the title bar or something?
>>
>> Thanks,
>> Steve
>
> Not sure what you mean here.
>
>
More information about the Squeak-dev
mailing list
|