[Q] mouseOverForKeyboardFocus preference

Hernan Tylim htylim at yahoo.com.ar
Fri Oct 31 02:11:50 UTC 2003


Hi Lex, thanks for your response.

I had played a little with this and made the attached change set. This
change set only modifies PluggableTextMorph and PluggableListMorph so
they get the keyboardFocus on mouseDown: instead on mouseEnter: when
mouseOverForKeyboardFocus preference is off.

A secondary effect that I don't like of my changes is that after
installing it a passive system window will require 2 clicks to get a
submorph to gain keyboard focus. The first click is to activate the
system window, the second click to reach the submorph. 

I tried several approaches to make the first mouseDown event to reach
the submorphs (after the activation) but I failed so I need to keep
looking. In the meanwhile here is the cs.

Thanks

Regards,
Hernán


> -----Mensaje original-----
> De: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] En 
> nombre de Lex Spoon
> Enviado el: Jueves, 30 de Octubre de 2003 07:08 p.m.
> Para: The general-purpose Squeak developers list
> Asunto: Re: [Q] mouseOverForKeyboardFocus preference
> 
> 
> "Hernan Tylim" <htylim at yahoo.com.ar> wrote:
> > 	I have always thought that mouseOverForKeyboardFocus on 
> false meant the
> > classic windows-style keyboard focus behaviour. That is: 
> click gains focus
> > and the focus stays until someone clicks in another place 
> or the morph is
> > deleted.
> 
> Squeak's behavior regarding keyboard focus seems to have grown rather
> than being designed.  The semantics you describe sound sensible to me,
> so if anyone wants to implement it that would seem great. It 
> seems quite
> silly to require a click into a window to grab focus, but then to lose
> focus as the mouse moves around.  It's the worst of both focus styles!
> 
> It turns out to be quite easy to mess with this kind of thing.  There
> are only about 50 senders of the various keyboard focus methods in
> Squeak 3.6, and so a person can really make an exhaustive pass of the
> image with no trouble and set up *everything* to act the way 
> they like. 
> The relevant methods are newKeyboardFocus:, releaseKeyboardFocus:, and
> releaseKeyboardFocus.  (Or maybe 1-2 more; go browse 
> HandMorph to see.)
> 
> 
> -Lex
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mouseDownForKeyboardFocus.1.cs
Type: application/octet-stream
Size: 1742 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031030/6c21bcc3/mouseDownForKeyboardFocus.1.obj


More information about the Squeak-dev mailing list