[BUG] SimpleHierarchicalListMorph doesnotunderstand#getCurrentSelectionIndex

Andreas Raab andreas.raab at gmx.de
Tue Jun 29 23:28:53 UTC 2004


> However, you didn't do it that way when you wrote PluggableListMorph>>

Then we should consider this a bug and fix it :-)

Cheers,
  - Andreas

----- Original Message ----- 
From: "Ned Konz" <ned at bike-nomad.com>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Tuesday, June 29, 2004 3:49 PM
Subject: Re: [BUG] SimpleHierarchicalListMorph
doesnotunderstand#getCurrentSelectionIndex


> On Tuesday 29 June 2004 3:28 pm, Andreas Raab wrote:
>
> > I disagree - if a key stroke selector has been set it should be called
no
> > matter what and the client (model) is then responsible to call
#arrowKey:
> > if it wants to. That's because otherwise you've got a heck of a time
> > (subclassing an arbitrary number of classes) if you ever want to be able
to
> > have "non-standard" responses to arrow keys.
> >
>
> That makes sense to me, too.
>
> However, you didn't do it that way when you wrote PluggableListMorph>>
>
> keyStroke: event
> "Process keys
> specialKeys are things like up, down, etc. ALWAYS HANDLED
> modifierKeys are regular characters either 1) accompanied with ctrl,
> cmd or 2) any character if the list doesn't want to handle basic
> keys (handlesBasicKeys returns false)
> basicKeys are any characters"
> | aChar aSpecialKey |
> (self scrollByKeyboard: event) ifTrue: [^self].
> aChar _ event keyCharacter.
> aSpecialKey _ aChar asciiValue.
> aSpecialKey < 32 ifTrue: [^ self specialKeyPressed: aSpecialKey].
> (event anyModifierKeyPressed or: [self handlesBasicKeys not])
> ifTrue: [^ self modifierKeyPressed: aChar].
> ^ self basicKeyPressed: aChar
>
>
> The first time your code looks at the keystrokeActionSelector is in
> modifierKeyPressed:.
>
> Did you have a change of heart?
>
> -- 
> Ned Konz
> http://bike-nomad.com
>
>




More information about the Squeak-dev mailing list