[Cuis-dev] adding functionality to morphs

Juan Vuletich juan at cuis.st
Sun Aug 25 06:25:04 PDT 2024


Hilaire's code should also work on TextEntryMorph. I'd stick to 
TextEntryMorph if you want a single line.

HTH,

On 8/22/2024 10:34 PM, Mark Volkmann via Cuis-dev wrote:
> The issue I've run into with TextModelMorph is that it seems to be for 
> multi-line input.
> Is there a way to configure it to only allow a single line of input 
> like TextEntryMorph does?
>
> On Thu, Aug 22, 2024 at 3:17 AM Hilaire Fernandes via Cuis-dev 
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
>     What about listening to key stroke event on TextModelMorph.
>     TextEntryMorph is a bit limited in its features. Code example from
>     DrGeo:
>
>         tMorph scroller
>             setProperty: #keyStroke:
>             toValue: [:event |
>                 tMorph scroller acceptContents.
>                 self changed: #isReadyToApply].
>
>     Le 22/08/2024 à 03:08, Mark Volkmann via Cuis-dev a écrit :
>>     I defined the class TextEntry2Morph which is a subclass of
>>     TextEntryMorph because I wanted to register a block to be
>>     evaluated every time it has focus and the user presses the escape
>>     key. It only adds the instance variable escapeAction and these
>>     instance methods:
>     -- 
>     GNU Dr. Geo
>     http://gnu.org/s/dr-geo/
>     http://gnu-drgeo.blogspot.com/
>
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>
>
>
> -- 
> R. Mark Volkmann
> Object Computing, Inc.


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240825/942e930a/attachment.htm>


More information about the Cuis-dev mailing list