Possible bug in PluggableListMorphByItemPlus>>getCurrentSelectionIndex

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Possible bug in PluggableListMorphByItemPlus>>getCurrentSelectionIndex

Damien Cassou-3
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