<!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 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
cite="mid:CAFfRWnXqt4ig4SscUqRydBXNjtSLXXNSM4P0Eve7aGiKiv8q_g@mail.gmail.com"
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 moz-do-not-send="true"
href="https://github.com/mvolkmann/Cuis-Smalltalk-Greeter">https://github.com/mvolkmann/Cuis-Smalltalk-Greeter</a>.</div>
</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2025 at
9:32 AM Hilaire Fernandes via Cuis-dev <<a
moz-do-not-send="true" href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid 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 moz-do-not-send="true" href="http://mamot.fr/@drgeo" target="_blank">http://mamot.fr/@drgeo</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a moz-do-not-send="true" href="mailto:Cuis-dev@lists.cuis.st"
target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a moz-do-not-send="true"
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 class="moz-signature" cols="72">--
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</pre>
</body>
</html>