[Cuis-dev] Be notified of edit from TextModelMorph

Mariano Montone marianomontone at gmail.com
Wed Feb 16 12:56:43 PST 2022


El 16/2/22 a las 17:38, Hilaire Fernandes via Cuis-dev escribió:
> Yes, I know. I want to explore all other options before subclassing.
> 
> TextModelMorph and its companion classes have a lot of method, so I may 
> have miss some of its behavior.

This works setting properties on TextModelMorph innerTextMorph, which is 
not ideal, but works if you want to avoid subclassing at all costs:

tm := TextModelMorph withText: 'test'.

tm innerTextMorph setProperty: #'keyDown:'
	toValue: [:ev | Transcript show: ev].
	
tm openInWorld

I don't know if there's other way to do it using TextModelMorph protocol ...

Cheers,

Mariano


More information about the Cuis-dev mailing list