[Cuis-dev] adding functionality to morphs
Mark Volkmann
r.mark.volkmann at gmail.com
Sun Sep 1 09:33:59 PDT 2024
Hillaire, I think you are suggesting that I could do something like this:
te := TextEntryMorph contents: 'change me'.
te editor class keyboardActions at: 27 + 1 put: #noop.
te setProperty: #keyStroke: toValue: [ :event | event keyValue print ].
te openInWorld.
But when I move focus to the TextEntryMorph and press the escape key, I get
a Debug window for MessageNotUnderstood: "SimpleEditor>>noop". I also tried
sending that keyboardActions array element to nil, but that also produced
an error.
On Sun, Sep 1, 2024 at 3:55 AM Hilaire Fernandes via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> You are conflicting with existing shortcuts. Observe and see how you can
> find a solution without the need to subclass.
> [image: shortcut]
> Le 31/08/2024 à 20:07, Mark Volkmann a écrit :
>
> Long story short, I don't see a way to change what happens when the user
> presses the escape key without creating a subclass of TextEntryMorph. I'm
> fine with doing that and already have that approach working. But I'm
> curious if there is an approach I overlooked that would allow me to
> customize what happens in a TextEntryMorph when the user presses the escape
> key (like I can for when the user presses the return key).
>
> --
> GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240901/7fc22f6e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pour Mark.png
Type: image/png
Size: 131512 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240901/7fc22f6e/attachment-0001.png>
More information about the Cuis-dev
mailing list