<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Hilaire,<br>
<br>
I've just pushed 3 changesets that allow #acceptOnAny: and
#keystrokeAction: . Please take a look.<br>
<br>
Thanks,<br>
<br>
On 2/17/2022 11:26 AM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:d61a9388-ad78-0f9c-5e66-e69ac93b5a89@drgeo.eu"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p><font size="4">Hi guys,</font></p>
<p><font size="4">This does the trick, I prefer to use keyStroke
(up and down key), keyDown works with a delay, model udpated
at second key down:<br>
</font></p>
<p><font size="4"> <font face="monospace"> inputWidget scroller<br>
setProperty: #keyStroke: <br>
toValue: [:event | inputWidget scroller
acceptContents]. </font><br>
</font></p>
<p><font size="4">May be a helper flag to autoUpdate the model. <br>
</font></p>
<p><font size="4">Or something more general with a block, but
likely, it is just one line to add in the user code, so not
sure you need to do it. But yes, an autoUpdate flag will be
handy enought for casual users of TextModelMorph.<br>
</font></p>
<p><font size="4">Thanks<br>
</font></p>
<div class="moz-cite-prefix">Le 17/02/2022 à 00:13, Juan Vuletich
via Cuis-dev a écrit :<br>
</div>
<blockquote type="cite" cite="mid:620D850B.30807@zoho.com">
<blockquote type="cite" style="color: rgb(153, 153, 153);">This
works setting properties on TextModelMorph innerTextMorph,
which is not ideal, but works if you want to avoid subclassing
at all costs: <br>
<br>
tm := TextModelMorph withText: 'test'. <br>
<br>
tm innerTextMorph setProperty: #'keyDown:' <br>
toValue: [:ev | Transcript show: ev]. <br>
<br>
</blockquote>
<br>
This looks like a good way to do it. Maybe we could add some
helper method(s) to TextModelMorph to ease it. Maybe
#keyDownAction: would be handy. <br>
</blockquote>
<pre class="moz-signature" cols="72">--
GNU Dr. Geo
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a class="moz-txt-link-freetext" href="https://independent.academia.edu/JuanVuletich">https://independent.academia.edu/JuanVuletich</a>
<a class="moz-txt-link-freetext" href="https://www.researchgate.net/profile/Juan-Vuletich">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a class="moz-txt-link-freetext" href="https://patents.justia.com/inventor/juan-manuel-vuletich">https://patents.justia.com/inventor/juan-manuel-vuletich</a>
@JuanVuletich</pre>
</body>
</html>