Squeak
  QotD    "To be or not to be" – Shakespeare
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Morph new openInHand
Last updated at 1:55 pm UTC on 9 January 2022
Evaluate in a Workspace

 Morph new openInHand

In the #new method it does a basicNew call to create an object and then initializes the Morph object as follows

 initialize
	"initialize the state of the receiver"
	owner := nil.
	submorphs := Array empty.
	bounds := self defaultBounds.
	color := self defaultColor


You may change the following two method of the Morph class to more convenient values
 defaultBounds
 "answer the default bounds for the receiver"
	^ 0 @ 0 corner: 50 @ 40

 defaultColor
	"answer the default color/fill style for the receiver"
	^ Color blue

The Morph object is attached to the cursor (a HandMorph object temporarily becomes its owner) and after it has been placed the desktop (World PasteUpMorph object) is the owner.

tagBeginner