[Cuis-dev] Add dynamic 'Accept' TextEditor menu entry

Philip Bernhart philip.bernhart at posteo.de
Tue Sep 17 12:55:01 PDT 2019


Hello all,

the attached changeset refactors a little bit the existing
TextEditor menu into different sections which are attached
to the menu generated with #getMenu.

I did that so that getMenu get's a little bit more readable
to me and also to add my little enhancement of showing
'Accept' entry on text model morphs which provide a textprovider
and setter. And also return true when setting a value with the
given setter.

Example code:

    model := TestModel new.

    morph := TextModelMorph
            textProvider: model
            textGetter: #value
            textSetter: #value:. "value: returns true"

    morph openInWorld.


Then a 'Accept (s)' entry shows up in the context menu,
which is in my opinion a valueable addition.

What do you think?


Thanks for your time,
Philip

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3867-CuisCore-JosefPhilipBernhart-2019Sep17-20h06m-jpb.1.cs.st
Type: application/vnd.sailingtracker.track
Size: 6169 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190917/d328ddec/attachment.bin>


More information about the Cuis-dev mailing list