[self-interest] Fix morphs

Jecel Assumpcao Jr jecel at merlintec.com
Fri May 10 21:13:11 UTC 2002


On Friday 10 May 2002 02:40, Thorsten Dittmar wrote:
> For an application that I'm writing in the moment, I need a morph
> that has fix position to the current view. For example like the
> radarView. When I looked at this implementation I found out that it
> works in different way then I mentioned. The radarView is not fixed,
> it just ignore the movements that was directed by the radarView
> itself. For example, if you have 2 radarViews and you use one of them
> to move to the right, the other is not visible in the current view
> anymore.

I would say that the radarView jumps to a new position in the world and 
then changes your viewpoint of that world so it ends up in the same 
place on the screen.

> What I need is something like the flaps in Squeak, but I found it not
> very helpful to look at their implementation. For me the differences
> between the two different implementations looks to great, maybe I'm
> wrong. Any idea how I can do things like that in self?

You can't scroll around in Squeak, so flaps are a rather different 
beast. But you are right - we really do need something like that.

When I was creating a presentation in Self for the 2000 Selfest the 
awkwardness of moving things around further than a single screen became 
too much. You have to drag an object from one side to the other, then 
drop it, then go to the radarView and click once on twice on the arrow 
buttons, then with the object now near the other side of the screen you 
repeat the process. So here is what I did - I modified the worldMorph 
so that typing the arrow keys on the keyboard would have the same 
effect as using the radarView. Now I could hold the object with the 
mouse (or objects, when using a carpetMorph) and scroll around with the 
keyboard to get to where I wanted to drop off the object. This made a 
*huge* difference in usability and allowed me to quickly do massive 
rearrangements of morphs spread around the world.

With a little more time I would probably have tried a different 
approach more like what you want: to allow objects to "hover" above the 
world so they would stay in the same place as you scrolled in the 
world. You might find this description of an evolution of this idea 
interesting: http://www.merlintec.com/pegasus2000/e_gui.html

One feature of flaps, the hability to hide off to one side when not in 
use, is much more important in Squeak where there is only one screen 
than in Self where we can have as many windows as we like. See the 
"open factory window" option in the yellow menu for an example of this 
flap-like behavior.

A possible implementation for the "hover objects" would be to patch the 
worldMorph's scrolling code. We could add a slot with a set of such 
object and the worldMorph would change each of their positions so that 
they would stay in one place on the screen like the radarView.

-- Jecel



More information about the Self-interest mailing list