[BUG] Request for fixes to MVC

Dan Ingalls Dan at SqueakLand.org
Fri Nov 16 19:15:38 UTC 2001


Greetings...

For a number of years I have been a responsible guy and continued to support MVC in Squeak.  I recently delved into that world, and found a number of problems present in both 3.2alpha and 3.1beta.

I'm responsible enough to see to these being fixed in time for 3.1 to go final, but right now I do not have time to fix them.  However I have what I consider to be a fairly complete list of the bugs and likely successful strategies for most, which I shall present here.

It would be great if a couple of MVC lovers would fix these, so we can continue to have the best of both worlds, as they say.  If no one rises to the occasion, then this will be the death knell of MVC in Squeak.  Don't let it happen.  Or do.  It's your Squeak.


Here they are...

1.  Open an MVC project, and open a browser in it.  At some time, though (this happened to me after I was asked for my initials when accepting a method), all request boxes and pop-up menus start appearing at the top left of the screen rather than where the mouse is.  This must be some caching issue, or something that has changed with events that causes the menu not to know where the cursor is.

The rest relate to morphic worlds within MVC.  Even if you aren't into morphic, this is the vehicle for 90% of the fun content in the image -- games, music, etc.

2.  When you open a morphic world (not a morphic sub-project), it appears with flaps showing, and this is probably an appropriate default.  However, when you open an application, as in
	EnvelopeEditorMorph new openInWorld
the app is placed in a world that fits closely around its bounds, and then flaps are added, obscuring the app.  It seems that for this case, flaps should not be added to the inner world.

3.  When you open a morphic world and start playing with it, you cannot get a viewer on any morph because the messages
	project naturalLanguage
gets sent to ActiveWorld which is an MVCWiWPasteUpMorph.  A reasonable quick fix for this would be:  In MVCWiWPasteUpMorph, define
	project
	    ^ Project current.

4.  By now you may have noticed that, when in the morphic world, ticking and display does not take place unless you are moving the mouse.  For instance, if you type, you will not see the characters until you nudge the mouse.  This will be even more dramatic if you do
	Tetris new openInWorld
See 6 below.

5.  You may also notice that menus in the morphic world do not break themselves up so as to fit in the world properly.  Presumably they are getting the bounds of the MVC world instead their morphic world.

6.  If you click in the morphic world, and then go out to the world menu and open a browser, it shows up in the morphic world (you only see it when you reenter ;-).  When you click out of the morphic World, either to wake up another window or to bring up the world menu, the variable ActiveWorld should get reset, and it appears that this is not happening.

This is a bit subtle , owing to what it means for the morphic world to be active, ie be the top, highlighted window.  I think we want it to go on ticking whether the mouse is in it or not, which means that ActiveMorph should stay bound to the morphic world during that time.  However, it must not be so when executing the screen menu choices.  The fix that I would recommend is:

	1.  Reset ActiveWorld (to nil) whenever activating a window in MVC

	2.  Reset it also when bringing up the world menu

	3.  Reassert ActiveWorld in the control loop for the
		morphic world so that if the user brings up the 
		world menu and does nothing to create a new window
		then the morphic world will continue to tick
		properly on top.

Note that the control loop is also the place to put a 'world doOneCycle' to fix the lack of ticking in (4).

7.  [more on 6] Interestingly, in an MVC debugger, I chose 'browse full' in the bottom left pane, and the browser appeared in the morphic world.  But when I chose 'browse class', it opened in MVC.  Apparently these two facilities use a different way to discover the active world.  I bet 'browse class' uses the old way that still works, and 'browse full' uses ActiveWorld, which has not yet been made to work properly in MVC.


These should be fun to fix -- most are one-liners once you find the right place.  Send out a message if you start working on this so we don't duplicate too much.

Thanks
	- Dan




More information about the Squeak-dev mailing list