<?xml version="1.0"?>
<rss version="0.91">
  <channel>
    <title>Squeak People diary for HernanTylim</title>
    <description>Squeak People diary for HernanTylim</description>
    <link>http://people.squeakfoundation.org/person/HernanTylim/</link>
    <item>
      <title>26 Nov 2003</title>
      <pubDate>Wed, 26 Nov 2003 19:57:04 -0700</pubDate>
      <link>http://people.squeakfoundation.org/person/HernanTylim/diary.html?start=5</link>
      <description>I made a little changeset with Andreas' code to make windows activation click be delivered to it's submorphs.

&lt;p&gt; In his mail Andreas said that he didn't like his solution but I need it, so &lt;a href=&quot;http://minnow.cc.gatech.edu/squeak/uploads/2959/passWindowActivationClick.cs&quot; &gt;here&lt;/a&gt; it is.

&lt;p&gt; By the way. I need it because of my clickForKeyboardFocus changeset. With that changeset loaded it gets annoying to click twice to make a window's submorph get the keyboard focus. With Andreas' proposal you don't need to click twice anymore.</description>
    </item>
    <item>
      <title>17 Nov 2003</title>
      <pubDate>Mon, 17 Nov 2003 20:14:46 -0700</pubDate>
      <link>http://people.squeakfoundation.org/person/HernanTylim/diary.html?start=4</link>
      <description>Wow! Ken. You made me Journeyer. Thanks man! but I think I am more of an apprentice level.

&lt;p&gt; Tell me the truth, it was an accident :)</description>
    </item>
    <item>
      <title>17 Nov 2003</title>
      <pubDate>Mon, 17 Nov 2003 16:21:22 -0700</pubDate>
      <link>http://people.squeakfoundation.org/person/HernanTylim/diary.html?start=3</link>
      <description>The other day I was rambling about some changes with the Squeak's keyboard-focus behaviour.

&lt;p&gt; Here &lt;a href=&quot;&quot; 'http://minnow.cc.gatech.edu/squeak/uploads/2959/kbrdFocusRotation-hpt.cs'&gt;kbrdFocusRotation-hpt.cs&lt;/a&gt; and here &lt;a href=&quot;&quot; 'http://minnow.cc.gatech.edu/squeak/uploads/2959/clickForKbrdFocus-hpt.cs'&gt;clickForKbrdFocus-hpt.cs&lt;/a&gt; are the promised change-sets.
</description>
    </item>
    <item>
      <title>17 Nov 2003</title>
      <pubDate>Mon, 17 Nov 2003 16:15:39 -0700</pubDate>
      <link>http://people.squeakfoundation.org/person/HernanTylim/diary.html?start=2</link>
      <description>The other day I was in Squeak editing some changes and I had something like 'aVeryLongComposedWord'. And I wanted to change, say the 'Composed' sub-string. So I thought. Why CTRL+&amp;lt;arrows&amp;gt; don't jump from word to word inside a composed word like the previous one ? And I modified ParagraphEditor&amp;gt;&amp;gt;nextWord: and previousWord:

&lt;p&gt; Here is the changeset:
&lt;a href=&quot;&quot; 'http://minnow.cc.gatech.edu/squeak/uploads/2959/altWordJump-hpt.cs'&gt;altWordJump-hpt.cs&lt;/a&gt;


</description>
    </item>
    <item>
      <title>15 Nov 2003</title>
      <pubDate>Sat, 15 Nov 2003 04:39:37 -0700</pubDate>
      <link>http://people.squeakfoundation.org/person/HernanTylim/diary.html?start=1</link>
      <description>&lt;p&gt;In my quest for developing a profesional looking ERP application I recently stumbled upon the keyboard-focus behaviour of Morphic. Which is:&lt;br&gt;
&lt;br&gt;
&lt;li&gt;The hand send all keyboard events to the keyboard-focus holder.
&lt;li&gt;The widgets (textmorphs, pluggableLists and others) all appropiate the keyboard-focus upon #mouseEnter.
&lt;p&gt;There is also a Preference, #mouseOverForKeyboardFocus, that controls whenever the widgets (TextMorph only really) will release the keyboard-focus upon #mouseLeave
&lt;p&gt;Now, for my ERP application what I would liked was something more like the traditional TAB hitting and mouse-clicking keyboard focus behaviour. So I implemented it.
&lt;p&gt;I will describe my solution here to benefit from your opinions. Please, also note that my intention is to make a package available from SM for you to try it (but it will not be in the very near future because I am without time right now).
&lt;p&gt;For the TAB focus switching I added to Morph the following methods:
&lt;p&gt;#handlesKeyboardFocusRotation: aKeyboardEvent
&lt;br&gt;#rotateKeyboardFocus: aKeyboardEvent
&lt;p&gt;And I modified #handleKeystroke: to ask if it handlesKeyboardFocusRotation, and if it does then rotateKeyboardFocus: will get called.
&lt;p&gt;These both methods doesn't really do anything more than to call an specialized object, which I called KeyboardFocusRotationHandler. A KeyboardFocusRotationHandler instance will be the one knowing upon which keystroke this morph is willing to release keyboard focus and knowing the chain of willing focus receptors.
&lt;p&gt;For the chain of focus receptors I made a KeyboardFocusChain class. Which could be nothing more than an ordered collection but I decided to give to it a little more responsibility like the knowledge to actually do the change of focus. (it has #switchToFirst, #switchToNext, #switchToPrevious and #switchToLast methods) 

&lt;p&gt; &lt;p&gt;&lt;i&gt;&lt;b&gt;[!]&lt;/b&gt; was this a good choice? I don't know. What do you think?&lt;/i&gt;
&lt;p&gt;Lastly, I added an utility method to Morph, #addToKeyboardFocusChain:, which will let a keyboard aware Morph subclass add himself to the focus chain. The default behaviour (as implemented in Morph) will be to forward the message to it's submorphs.

&lt;p&gt; &lt;p&gt;As an example imagine aMorph with lots of PluggableTextMorphs and PluggableListMorphs.
&lt;p&gt;&lt;i&gt;aMorph addToKeyboardFocusChain; KeyboardFocusChain new.&lt;/i&gt;
&lt;p&gt;It's what is only needed to make every PTM and PLM respond to TAB to change to the next willing focus receptor.
In addition to the keyboard-focus rotation I made a lot of other tweaks to PluggableTextMorph, Morph and TextMorph so they:
&lt;br&gt;
&lt;li&gt;will not release the focus on mouse-leave when #mouseOverForKeyboardFocus preference was set to false.
&lt;li&gt; will only show the selection if they got keyboard-focus. (The cursor is a 0 length selection. It was confusing to see a PluggableTextMorph with a cursor when it didn't have the focus). I added a showSelectionOnlyOnKeyboardFocus: trueOrFalse method for this.
&lt;li&gt;Because I need it I added the ability to make an auto-accept when the focus was released. I added an autoAcceptOnFocusLoss: trueOrFalse method for this.</description>
    </item>
    <item>
      <title>14 Nov 2003</title>
      <pubDate>Fri, 14 Nov 2003 15:28:58 -0700</pubDate>
      <link>http://people.squeakfoundation.org/person/HernanTylim/diary.html?start=0</link>
      <description>Well, here I am. This is my first experience with blogs so please don't expect too much from me for this first post :) 

&lt;p&gt; &lt;p&gt; I just want to say that I am really surprised (in a good way) with SqP and I am liking it very much.

&lt;p&gt; &lt;p&gt; From now on I will try to use this space for more interesting post. Like for example for posting status reports of a commercial application I am currently developing in Squeak.
</description>
    </item>
  </channel>
</rss>
