[newbie] resize micro-hang, sketchmorph digression

Simon Michael simon at joyful.com
Mon Aug 27 06:16:14 UTC 2001


resize micro-hang
-----------------
resizing a debug window, I drag the border down the bottom of the
screen and release. If the pointer happens to be over a flap tab, I
get 100% CPU utilization and a total mouse hang lasting about 15
seconds.

sketchmorph digression
----------------------
A little digression for relief. I have a real-life work task where I
think squeak might help me out. It's like this: a client wants the
buttons on their web site to raise when you mouse-over, indent when
you click.  They need to see many variations and alternatives. I have
been working on prototypes with Gimp, which has various extensions to
help with this specific task; it's still hard work and slow.

That was with square buttons; actually now it seems the buttons are to
be continent-shaped. Hey! How about some morphs with raised borders &
insets ?  Using morphs I might prototype some passable buttons and
change them around so, SO much quicker than in gimp.

Sketched out a decent silhouette of africa for testing, using the
Paint flap (previously enabled via the World->flaps menu).
Right-click for halo, click the purple icon for color properties. But
selecting a border color, or the Raised/Inset checkboxes seems to have
no effect. How come ?

I found out this way: right-clicked on the Raised checkbox until at
the innermost selection (some kind of Button). Clicked the debug
(spanner) icon (previously enabled in Preferences); chose "explore
morph".  Opened the root item; saw "target: ObjectPropertiesMorph" and
"actionSelector: toggleTargetBorderRaised". Selected the latter then
middle-click -> "implementers of ...". From here browsed around and
figured out that my SketchMorph's borderWidth is 0, because it doesn't
implement borders, unlike eg a Rectangle (Quadrangle).

Only in squeak would I now think: hey, Quadrangle doesn't look so bad,
maybe I can just hack in some border support for SketchMorph - and
then I'll have my buttons.

Hmm. Questions of where to best implement this. I start copying
Quadrangle methods right over into SketchMorph. I get an error window
when I try to add border-related instance variables; apparently a
subclass already implements these and I am doing something newbieish.
Squeak knows all. Hmmm.




More information about the Squeak-dev mailing list