Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
a morph has a name
Last updated at 6:35 pm UTC on 1 January 2019
A morph has a default "internal" name which you get with
 aMorph name.

It is constructed using the identityHash value.

Example
 r := Morph new extent: 100@50; openInWorld.

then print:

 r name

and you'll see something like this (your identity number (406826) will most likely be different):

    'a Morph(406826)'


However you may use #setNameTo: / knownName to work with a specific "external" name for the morph.



Example

To open a note card with a named PasteUpMorph do

 p := PasteUpMorph new setNameTo: 'myNote'; extent: 640@480; openInHand.

And
 p name 
is (again, your identity number will be different)
 'a PasteUpMorph<myNote>(1129382)'

whereas
 p externalName 
and
 p knownName

is
'myNote'


More: Post it morphs or slides for a presentation