Personal info for HernanTylim

This person is currently certified at Journeyer level.

Name: Hernán Tylim

Homepage: http://minnow.cc.gatech.edu/squeak/2959

Notes: I am a computer science student at University of Buenos Aires (UBA - Argentina). I am doing my master thesis work with objects and Squeak.

This person is:

Recent diary entries for HernanTylim:
RSS

26 Nov 2003  »

I made a little changeset with Andreas' code to make windows activation click be delivered to it's submorphs.

In his mail Andreas said that he didn't like his solution but I need it, so here it is.

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.

17 Nov 2003  »

Wow! Ken. You made me Journeyer. Thanks man! but I think I am more of an apprentice level.

Tell me the truth, it was an accident :)

17 Nov 2003  »

The other day I was rambling about some changes with the Squeak's keyboard-focus behaviour.

Here kbrdFocusRotation-hpt.cs and here clickForKbrdFocus-hpt.cs are the promised change-sets.

17 Nov 2003  »

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+<arrows> don't jump from word to word inside a composed word like the previous one ? And I modified ParagraphEditor>>nextWord: and previousWord:

Here is the changeset: altWordJump-hpt.cs

15 Nov 2003  »

In my quest for developing a profesional looking ERP application I recently stumbled upon the keyboard-focus behaviour of Morphic. Which is:

  • The hand send all keyboard events to the keyboard-focus holder.
  • The widgets (textmorphs, pluggableLists and others) all appropiate the keyboard-focus upon #mouseEnter.

    There is also a Preference, #mouseOverForKeyboardFocus, that controls whenever the widgets (TextMorph only really) will release the keyboard-focus upon #mouseLeave

    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.

    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).

    For the TAB focus switching I added to Morph the following methods:

    #handlesKeyboardFocusRotation: aKeyboardEvent
    #rotateKeyboardFocus: aKeyboardEvent

    And I modified #handleKeystroke: to ask if it handlesKeyboardFocusRotation, and if it does then rotateKeyboardFocus: will get called.

    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.

    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)

    [!] was this a good choice? I don't know. What do you think?

    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.

    As an example imagine aMorph with lots of PluggableTextMorphs and PluggableListMorphs.

    aMorph addToKeyboardFocusChain; KeyboardFocusChain new.

    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:

  • will not release the focus on mouse-leave when #mouseOverForKeyboardFocus preference was set to false.
  • 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.
  • 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.
  • 1 older entry...

    This person has certified others as follows:

    Others have certified this person as follows:

    [ Certification disabled because you're not logged in. ]

    [ Home | Articles | Login/Account | People | Projects ]