View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide


Four selectors/aspects:

	- Retrieve text from model
	- Submits new text to model (nil = Read Only)
	- Current text selection
	- Yellow-button menu

PluggableTextMorphExample: IRCConnection openAsMorph
	win := SystemWindow labelled: 'IRC'.
	win model: self.

	consolePane := PluggableTextMorph 
		on: self 
		text: #consoleText 
		accept: nil 
		readSelection: #consoleTextSelection 
		menu: #consoleMenu:.
	win addMorph: consolePane frame: (0@0 extent: 1@0.9).

	inputPane := PluggableTextMorph 
		on: self  text: nil  accept: #sendRawCommand:.
	inputPane acceptOnCR: true.
	win addMorph: inputPane  frame: (0@0.9 extent: 1@0.1).
	win openInWorld.

        Changes propagation:
        self changed: #consoleText

Link to this Page