Morph browser discussion

Bob Arning arning at charm.net
Sun Nov 21 22:23:51 UTC 1999


Hi Stefan,

You raise some interesting questions on an interesting topic. Let me suggest a few things that might:
- help you do what you want
- help me understand your circumstances better and/or
- help us design better tools.

On Sun, 21 Nov 1999 21:20:41 +0100 Stefan Rieken <StefanRieken at SoftHome.net> wrote:
>
>-I browse, and I find a system class, like DisplayScreen. I want to
>modify the current instance of it. The documentation says that its
>instance is always called Display. OK, so now I know. But there is no
>really active way to find out about the instances of a class that I can
>address.

For any class you could do
	putTheClassNameHere allInstances explore

so that

	DisplayScreen allInstances explore

would give you a nice handle on all instances (there will be only one) of DisplayScreen which you can then being to explore and/or modify (well, be careful with the modification part). More interesting might be to look things like

	SystemWindow allInstances explore
	PluggableListMorph allInstances explore

Another way is to do this straight from the browser. With the class in question selected, go to the method list pane (upper right pane in a standard browser), bring up the shifted red-button menu (shift-option click on a mac, shift-rightClick on Win) and choose "inspect instances".

>-I make a nice Morph, but for one reason or another I destroy its visual
>component (you'd be surprised how often I manage to do that; make it
>unreachable, give it the backgroundcolor, make it very small etc.). Now
>I have no known control on the Morph anymore. But it isn't garbage
>collected, too, because it is theoretically still accessible. This
>always leaves me with an "eek! I screwed it up again" feeling. I never
>dare to do anything in Squeak because I always feel that my
>playing-around leaves its marks behind.

An idea here might be to do

	World explore	(or choose explore world from the World/debug... menu)

then click down on the triangles to see the submorphs of the World and then the submorphs of those morphs, etc until, ultimately, you can see any morph currently in this world. If you run across one that may no longer be visible, select it and evaluate

	self delete

in the lower pane and it's gone. Another approach, if you knew it was an instance of MyFunkyMorph, would be to do

	MyFunkyMorph allInstances explore

then drill down to the broken one, select it and evaluate "self delete" in the lower pane.


Granted that these may not be obvious to the new user, but they are not far off the beaten path. Do you see a way that
- they could be useful to you?
- they could be made more accessible?

Cheers,
Bob





More information about the Squeak-dev mailing list