<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Gosh. Last minute rename gone wrong.<br>
<br>
Fixed #tabToFocus: . Also added it to TextModelMorph. Hope it is
correct now.<br>
<br>
Thanks for testing and sending feedback!<br>
<br>
Cheers,<br>
<br>
On 1/31/2025 9:40 PM, Mark Volkmann via Cuis-dev wrote:
<blockquote
cite="mid:CAFfRWnXe4eTL8L4c7K2O+DFZF89vf7gse6Yaks4y3hHM=bRQjQ@mail.gmail.com"
type="cite">
<div dir="ltr">It seems that the way to change an instance of
TextModelMorph to support using the tab key for moving focus is
to do this:
<div><br>
</div>
<div><font face="monospace"> myInput scroller tabToFocus: false.</font></div>
<div><br>
</div>
<div>This works great!, But I'm wondering if tabToFocus: should
also be a method in TextModelMorph which delegates to
InnerTextMorph (the scroller) so I don't have to know about
scroller. Also, it seems like if I want that behavior, I
should set it to true instead of false, but currently I have
to set it to false.</div>
</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 moz-do-not-send="true"
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: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<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
moz-do-not-send="true"
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
moz-do-not-send="true"
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: 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 cols="72">--
Juan Vuletich
<a moz-do-not-send="true" href="http://cuis.st" target="_blank">cuis.st</a>
<a moz-do-not-send="true" href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a moz-do-not-send="true" href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a moz-do-not-send="true" href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a moz-do-not-send="true" href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a moz-do-not-send="true" href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a moz-do-not-send="true" 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>
</blockquote>
<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>