[Newbies] How to reference a morph in code - but the morph was created by direct manipulation

Mike Stramba mikestramba at gmail.com
Wed Jul 8 03:28:44 UTC 2009


Drag and dropping the morph on a workspace is good start (you have to
click on the "square" in the workspace header, and turn on the "create
textual reference to dropped morphs" option).

Also when you create the morph it gets added to the current "desktop"
(world) submorphs instance variable.

You can MMB  on the "desktop", click the debug tab and explore the
current world.  You'll see it's a PasteUpMorph.

You can get all the PasteUpMorphs in the image with : p :=
PasteUpMorph allInstances, which returns an array of all the projects
"desktops" in the image.

On Tue, Jul 7, 2009 at 5:17 PM, Kevin Polston<khwp.01 at googlemail.com> wrote:
> How do I reference (i.e. program) a Morph created by direct manipulation,
> for instance dragging a text box from the supplies menu to the desktop, via
> Squeak/Smalltalk code in say the workspace? I'm okay (well sort of - I'm
> just learning Morphic) when I instantiate a Morph via Squeak/Smalltalk code
> but I'm at a loss when I've dragged a Morph into existence.
>
> Many thanks
> Kevin
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>


More information about the Beginners mailing list