PluggableLispMorph question

Herbert König herbertkoenig at gmx.net
Sat Apr 16 20:56:47 UTC 2005


Hello folks,

is there a way to use methods with a parameter to retrieve the list in
creating a pluggableListMorph with
PluggableListMorph>>on:list:selected:changeSelected: ?

To explain:

I have four of these list morphs on four objects of the same class and
the #list selector has to create the array of strings from a
collection of associations.

So I would like to say:
PluggableListMorph
  on: myObject
  list: #createRequiredArrayFrom: myObject
  selected: ...
  changeSelected ...

The solution I use right now is to have four wrapper methods for each
of my objects:
#createRequiredArrayFromObjectX
where X = 1...4
which does ^ (createRequiredListFrom: objectX)
where X=1...4

This seems unelegant to me and I am especially annoyed by the fact
that I did clever factoring right at the start, wrote a SUnit test for
my method (really!!), only to find out, I can't use it the way I
intended to use it :-)))

So the question is: is it impossible to use a message with a parameter
in this place or is it just me the newbie who cannot figure out the
syntax?


Thank you,

Herbert                          mailto:herbertkoenig at gmx.net




More information about the Squeak-dev mailing list