Hello
On 1/19/17, Jecel Assumpcao Jr. jecel@merlintec.com wrote: ...
One of my roles in the Squeak community has been to remember the past.
Recently I was wondering about the names of Morphs.
Setting a name is done with
aMorph name: 'theName'
To get it back I need to do
aMorph externalName
Maybe you know the historical reason for it?
-- Hannes
Morphs have basic attributes
Setters:
- #position: - #extent: - #color: - #name:
For the first three attributes getters are labeled the same [1]
For the 'name' attribut it is different. To get the name I have set I need to use #externalName.
m := (RectangleMorph new name: 'myRect') openInWorld.
m name
'a RectangleMorph<myRect>(115748)'
m externalName 'myRect'
--------------------------------------------------------------------- [1] Slides in markdown format
Morphs have a position ------------------------------------
Morph new position: 100@100; openInWorld; inspect.
In the Inspector
self position
gives
100@100
Morphs have an extent -------------------------------------
m := Morph new. m extent: 320@240. m openInHand. m inspect
In the Inspector
self extent
gives
320@240.
Morphs have a color ----------------------------------
m := Morph new. m color: Color red. m openInHand. m inspect
In the Inspector
self color
gives
Color red