I have a Person class with in ivar that holds an
Organization. I
would like to present a drop down list of Organizations when editing
the person. I have tried various permutations of
MASingleOptionDescription and MAOneToManyDescription, but I am not
groking how they should be used :)
That sounds like a MASingleOptionDescription.
Try something like (I just copied this example from Pier):
descriptionAlign
^ MASingleOptionDescription new
selectorAccessor: #align;
label: 'Align';
options: #(nil #left #center #right );
yourself
There is also #optionsAndLabels: if you need something special for
the labels. So you could write:
descriptionAlign
^ MASingleOptionDescription new
selectorAccessor: #align;
label: 'Align';
optionsAndLabels: { nil -> 'Undefined'. #left -> 'Left Align'. ...
};
yourself
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch