[squeak-dev] How do I move a morph from one project to another?

tim Rowledge tim at rowledge.org
Tue May 1 17:16:52 UTC 2018

> On 01-05-2018, at 9:51 AM, Bob Arning <arning315 at comcast.net> wrote:
> There is more than one way to add a morph to a world: front, back, in layer, before, after, etc. Might be a lot of extra methods that would rarely be used.
> On 5/1/18 11:54 AM, Chris Cunningham wrote:
>> I'm talking my way into adding something like this to Trunk.  But, shouldn't we just addMorph: to project, instead of looking at its world to add it there?  Yes, it doesn't support this yet, but shouldn't it with appropriate encapsulation?

But for the common case of wanting to teleport a Morph from one project to another we can make a nice clean abstraction. Like maybe
     Project chooseNewProjectAndMoveMorph: self
This makes it convenient for Project to use the appropriate UI as for opening browsers etc and hides possible different arrangements for the way morphs might live in the new project. After all, a new kind of project might now have a world concept; we shouldn't know or care at this point.
Perhaps return the destination Project or nil so we can do something further if the user chose to cancel or the project declined to accept the transfer. Again, send something like #acceptTransferOfMorph: theMorph to the chosen Project.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: NNI: Neglect Next Instruction

More information about the Squeak-dev mailing list