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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Kevin Polston

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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How to reference a morph in code - but the morph was created by direct manipulation

Enrico Schwass-2

I have no squeak image around, but there is an entry
In workspace menu halo about references

Activate that item and drag your morph to this
Workspace

Hth
Enno

Am 07.07.2009 um 23:17 schrieb Kevin Polston <[hidden email]>:

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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How to reference a morph in code - but the morph was created by direct manipulation

K. K. Subramaniam
In reply to this post by Kevin Polston
On Wednesday 08 Jul 2009 2:47:47 am Kevin Polston 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?
See "Create textual references to dropped morphs" in Workspace menu (white
menu icon near top left corner).

Subbu
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How to reference a morph in code - but the morph was created by direct manipulation

mstram
In reply to this post by Kevin Polston
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<[hidden email]> 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
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners