[Cuis-dev] adding functionality to morphs

Mark Volkmann r.mark.volkmann at gmail.com
Fri Aug 30 06:33:37 PDT 2024


That approach works, but in my specific case I need to detect the escape
key. Here is what I tried:

te := TextEntryMorph contents: 'change me'.
te setProperty: #keyStroke: toValue: [ :event | event keyValue print ].
te openInWorld.

When I move focus to the TextEntryMorph and press the escape key, 27 is
displayed in the Transcript which is great. But it also displays a menu
containing the Copy, Cut, and Paste options. For my use case I'd like to
find a way to prevent that. I've spent some time searching the code to
discover where that happens, but I haven't found it yet.

On Thu, Aug 29, 2024 at 2:56 AM Hilaire Fernandes <hfern at free.fr> wrote:

> Hi Mark,
>
> Le 26/08/2024 à 01:30, Mark Volkmann a écrit :
> > I need to learn how to create a change set for Cuis Smalltalk. Are the
> > steps documented somewhere?
>
> In the Cuis Book, there is a section, not very detailed but it should
> cover the essential.
>
> However I am realizing you don't need to modify the class, just do:
>
> aTextEntry setProperty: #keyStroke: toValue: [:event |
>      " do what you need to be done].
>
> Hilaire
>
> --
> GNU Dr. Geo
> http://gnu.org/s/dr-geo/
> http://gnu-drgeo.blogspot.com/
>
>

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240830/cc64885d/attachment.htm>


More information about the Cuis-dev mailing list