<div dir="ltr">That's excellent! I learned a lot implementing my solution, so no loss there. I'll try out the new approach in my small demo app.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Jan 31, 2025 at 1:44 PM Juan Vuletich <<a href="mailto:juan@cuis.st">juan@cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
Hi Mark,<br>
<br>
Thanks for raising this.<br>
<br>
I just pushed two changes that enable tab / shift-tab for all
widgets except TextMorphs. But I also added a message to disable tab
as a valid input. Then tab controls focus for them too.<br>
<br>
Additionally, adding ctrl makes it work regardless of the text morph
handling tab as valid entry.<br>
<br>
Apologies if you feel this should have been sooner in Cuis, saving
you some time.<br>
<br>
Thanks,<br>
<br>
On 1/30/2025 7:15 PM, Mark Volkmann via Cuis-dev wrote:
<blockquote type="cite">
<div dir="ltr">I found a better way to handle the tab key for
moving focus between text inputs.
<div>Rather than modify InnerTextMorph or TextModelMorph, I did
the following:
<div><br>
</div>
<div>- Created a subclass of InnerTextMorph named
InnerTextNoTabMorph.</div>
<div> This overrides the processKeystrokeEvent: method to be
the same as in InnerTextMorph except it does not process tab
key events.</div>
<div> I also added an onChange: method that takes a block
that it evaluates every time it processes a key event.</div>
<div><br>
</div>
<div>- Created a subclass of TextModelMorph named
TextInputMorph.</div>
<div> This has an initialize method that sets up event
handling to handle tab key presses and move focus
appropriately.</div>
<div> It implements the innerMorphClass method to indicate
that it wants to use InnerTextNoTabMorph instead of
InnerTextMorph.</div>
<div> It implements the onChange: method to forward a block
onto the same method in InnerTextNoMorph.</div>
<div><br>
</div>
<div>With these classes in place, my Greeter class uses
TextInputMorph in place of TextModelMorph</div>
<div>and voila tabbing between text inputs works great!</div>
<div><br>
</div>
<div>You can find all this code at <a href="https://github.com/mvolkmann/Cuis-Smalltalk-Greeter" target="_blank">https://github.com/mvolkmann/Cuis-Smalltalk-Greeter</a>.</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2025 at
9:32 AM Hilaire Fernandes via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><font size="4">That would be neat. But a Tab option in
TextModelMorph may prove to be more useful for Widget as
in Cuis-Smalltalk-UI.</font><br>
</p>
<div>Le 28/01/2025 à 22:06, Mark Volkmann via Cuis-dev a
écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">Thanks Juan! I'll see if maybe I can create
a subclass of TextModelMorph that has that behavior.
Perhaps each instance of the subclass can hold a
reference to another morph that should take focus when
the tab key is pressed. Maybe I can create a set of
morphs that have that ability such as checkboxes, radio
buttons, and so on. That would enable creating user
interfaces that are completely keyboard-driven as is
common in web interfaces.</div>
</blockquote>
<pre cols="72">--
<a href="http://mamot.fr/@drgeo" target="_blank">http://mamot.fr/@drgeo</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
<div><br clear="all">
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R.
Mark Volkmann</font></div>
<div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object
Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<br>
<pre cols="72">--
Juan Vuletich
<a href="http://cuis.st" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div>