Possible bug in PluggableListMorphByItemPlus>>getCurrentSelectionIndex

Damien Cassou damien.cassou at gmail.com
Sun Jul 1 14:36:27 UTC 2007


Hi,

I have a problem with ToolBuilder and lists.

The method PluggableListMorphByItemPlus>>getCurrentSelectionIndex is
implemented as:

getCurrentSelectionIndex
  "Answer the index of the current selection."
  | item |
  getIndexSelector == nil ifTrue: [^ 0].
  item := model perform: getIndexSelector.
  ^ list findFirst: [ :x | x = item]

However, list is a list of strings. Wouldn't it make more sense to
enumerate the list of models which can be accessed through itemList
instead of list?

-- 
Damien Cassou



More information about the Squeak-dev mailing list