Loading Morphic Wrappers change set

John Duncan jddst19+ at pitt.edu
Thu Sep 9 05:07:06 UTC 1999


This brings me to wonder: would Smalltalk benefit from renaming
declarations? Like:

PasteUpMorph alsoKnownAs: #WorldMorph

I figure this can be done somewhat easily without the renaming
declaration stuff, sort of, but it seems it would help retain upward
compatibility without generating lots of compatibility classes.
Ideally, orthogonal packages shouldn't have to keep up entirely with
refactoring. The renaming stuff helped Ada 95 keep a lot of upward
compatibility, and only certain problematic functionality had to be
maintained using special stuff.

-John

----- Original Message -----
From: Dan Ingalls <Dan.Ingalls at disney.com>
To: Stewart MacLean <stewart.maclean at nzhis.govt.nz>
Cc: <squeak at cs.uiuc.edu>
Sent: Thursday, September 09, 1999 12:53 AM
Subject: Re: Loading Morphic Wrappers change set


> !WorldMorph methodsFor: 'morphic wrappers' stamp: 'LC 12/31/1998
13:20'!
>runTo: aMorph
> "A world cannot run."
> self shake: 6! !
>
>where WorldMorph is undeclared in my 2.5 image.
>
>Being a Mophic newbie I'm not sure whether it's supposed to pre-exist
of
>come with your package?
>
>Any help appreciated (I wanted to fire that cannon!)

Stewart -
In 2.5, WorldMorphs were replaced by PasteUpMorphs, so that they would
make a reasonable unit of morphic storage whether or not they were a
whole world.  All pasteUpMorphs respond to #isWorldMorph with true or
false if you need to know what's what.

For this particular case, I believe the following would be an
effective replacement:

!PasteUpMorph methodsFor: 'morphic wrappers' stamp: 'DI 9/9/1999
11:11'!
runTo: aMorph
self isWorldMorph ifTrue:
["A world cannot run."
^ self shake: 6]
^ super runTo: aMorph! !

Note that if runTo: is elsewhere defined in PasteUpMorph, then that
def should replace the line with super in it.

The WorldMorph change may have fouled up MathMorphs a lot, but we
managed to keep it compatible enough that we read in all the changes
while the system was running in Morphic.  My guess is that it
shouldn't take too many fixes like this to bring it up in 2.5.

Hope this helps.

- Dan





More information about the Squeak-dev mailing list