[BUG][FIX] TextPlusMorph focus/cursor (was: [BUG] GeeMail no Cursor)
Andreas Gerdes
squeakdev at skalarsoft.com
Thu Aug 19 03:08:09 UTC 2004
Just by chance, a companion squeaker told me, that my bug-posting was
answered today by Karl Ramberg -
I did not get that mail and am wondering now, how many others I do not
get and WHY!?
Howsoever, thanks to Karl, I could fix the bug by applying the changes in:
5849TextMorphSelectionFix ( "Change Set: FocusFixes-rr | Date: 23
March 2004 | Author: Romain Robbes")
to the TextPlusMorph.
Some questions are left for me:
In the attached changeset, there is just this new line:
paragraph isNil ifFalse:[paragraph focused: aBoolean].
Focus is shown, then, but is never lost afterwards. This is normal for
the GeeMailMorph, I always found that irritating.
If I apply the changes described below, the TextPlusMorph shows and
looses focus like any other TextMorph.
---------------
keyboardFocusChange: aBoolean
| parent |
"we basically ignore loss of focus unless it is going to one of our
siblings"
aBoolean ifFalse: [^self].
1. ^^^ remove this and rather put the question around the
"Inform...."-code like 2. below
paragraph isNil ifFalse:[paragraph focused: aBoolean].
^^^ in the attached changeset I added this line
"A hand is wanting to send us characters..."
self hasFocus ifFalse: [self editor "Forces install"].
2. aBoolean ifTrue:[
"Inform our siblings we have taken the focus"
parent _ self parentGeeMail ifNil: [^self].
parent allTextPlusMorphs do: [ :each |
each == self ifFalse: [each keyboardFocusLostForSure]
]].
self changed.
3. ^^^^ add this line
------------------
Works nicely - any reason NOT to do so?
Thanks
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextPlusMorphFocusFix.cs.gz
Type: application/x-gzip
Size: 508 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040819/64fbe573/TextPlusMorphFocusFix.cs.bin
More information about the Squeak-dev
mailing list
|