I added the following in my image:
MAOptionDescription>>labels: aBlock
"Set the labels for each option by evaluating the block."
|labels|
labels := Dictionary new.
self options do: [:ea | labels at: ea put: (aBlock value: ea)].
self propertyAt: #labels put: labels.
so that is is used like:
descriptionProvider
^ (MASingleOptionDescription new)
selectorAccessor: #provider;
label: 'Staff';
reference: ALStaffMember description;
options: ALStorage rootOrg staff;
labels: [:ea | ea fullName];
priority: 20;
yourself
This is very helpful for me using SingleOptions that are pointing to
dynamic lists; is there already a way to do this without modifying
Magritte?
- Brian