Question about PluggableListMorphOfMany
Hernan Tylim
htylim at yahoo.com.ar
Sun Apr 4 20:57:43 UTC 2004
Hi,
I have a question about PluggableListMorphOfMany and I hope someone of
you can help me.
I found on the Class comments that PluggableListMorphOfMany require the
model to implement #listSelectionAt: and #listSelectionAt:put:.
My question is, why these selectors are hardcoded and don't use ones
passed on creation?
I looked at the code and the only place where one of these methods are
called is on:
PluggableListMorphOfMany>>itemSelectedAmongMultiple: index
itemSelectedAmongMultiple: index
^model listSelectionAt: index
I would rather propose:
itemSelectedAmongMultiple: index
^getSelectionListSelector
ifNotNil: [model perform: getSelectionListSelector with:
index]
ifNil: [model listSelectionAt: index]
This would be ok? It seemed odd to me that everywhere in the class were
used "model perform: getSelectionListSelector with: index", and only on
that method used the a hardcoded listSelectionAt: call.
Thanks
Regards,
Hernán
More information about the Squeak-dev
mailing list
|