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
Note on the implementation of Workspace
Last updated at 4:31 am UTC on 5 March 2017
Needs to be updated...



In Morphic a Workspace is opened by plugging a FAQ: Entry Field in Morphic on it and wrapping it in a SystemWindow. The SystemWindow has as submorphs an AlignmentMorph and the FAQ: Entry Field in Morphic. The AlignmentMorph is kept in the instance variable labelArea of the SystemWindow.

The following method opens the Workspace. It is implemented in the superclass StringHolder
openAsMorphLabel: labelString  inWorld: aWorld
	"Workspace new openAsMorphLabel: 'Workspace'"
	| window |
	window _ (SystemWindow labelled: labelString) model: self.

	window addMorph: (PluggableTextMorph on: self text: #contents accept: #acceptContents:
			readSelection: nil menu: #codePaneMenu:shifted:)
		frame: (0@0 corner: 1@1).

	window openInWorld: aWorld