Morph browser discussion

Gerardo Richarte core.lists.squeak at core-sdi.com
Mon Nov 22 19:43:31 UTC 1999


tell me to stop.

	This mail i regarding (again) the use of MorphicWrappers, just skip it
if you fill like doing so.

Stefan Rieken 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.

	Somebody else already told you about allInstances, someInstance and
inspect instances, let me tell you about a different way to use this...

	first file in morphic wrappers (get them from www.dm.uba.ar/MathMorphs
or www.sugarweb.com (I think that the latter has the newest version,
even when the former is the official site...)

	Now, open a world morph (morphic project/paste up morph).

	wherever you are type 'DisplayScreen' hit enter (we call this aerial
typing or type in the air)
	You'll get a ClassMorphicWrapper attached to your hand (mouse pointer)
	place your hand over DisplayScreen (I mean, its morphic wrapper) 
	type 'self someInstance' or 'self allInstances' and hit enter.

	now you'll have attached to your hand an instances of DisplayScreen or
a collection containing DisplayScreen allInstances.

	now, do whatever you want with them... if you are not used to morphic
wrappers, you'll want to place your hand over the instance (or
collection) and type 'self inspect.' (note the $.) to inspect it.
	But you can also try things like 'self become: anotherInstance' (more
on this latter)
 
> -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.).

	easy, easy...

	whenever you create a Morph (aerialTyping something like 'EllipseMorph
new' enter) you'll get it attached to your hand, you then place it
wherever you want, and use it... you can still lose it but not if you
name it:

	aerialType 'myEllipse _ EllipseMorph new'
	or place you hand over something and aerialType 'givenName _ self.'

	so, if you do 'anotherInstance _ MyDisplayScreen new' then you can do
'self become: anotherInstance' easily.

> 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. 

	A note on this, if you want to delete something from the world just
touch it (place your hand over it) and hit Backspace.

> Just see me in this context as the kid that should be able to play with
> Smalltalk, and these comments as things that this kid doesn't yet quite
> manage. I hope they are helpful,

	So, I think, you may like MorphicWrappers... just a guess.


	Visionary Bye!
	Richie++

PS: I may be wrong from scratch, being MW something not in the line of
OO modeling, but something else. And it may be a big mistake to start
with MW becouse you model your mind in a direction with a very short
path, which will not let you create freely, as it's attached to a short
idea (MorphicWrappers), so beware of it! (anyway, my movements are still
in that direction, so...)

-- 
A390 1BBA 2C58 D679 5A71 - 86F9 404F 4B53 3944 C2D0
Investigacion y Desarrollo - CoreLabs - Core SDI
http://www.core-sdi.com

--- For a personal reply use gera at core-sdi.com





More information about the Squeak-dev mailing list