On 17/11/10 4:34 AM, Norbert Hartl wrote:
Well, the question was maybe too unspecific. At first I'm looking for
a possibility to create options from the instance side while dealing
with components.
I don't fully understand what you're trying to achieve, but how about you
override #description on the instance side. Something like:
description
| desc instanceSpecificDesc |
desc := super description copy. "Copy, else per class cache altered"
desc add: (instanceSpecificDesc := self descriptionInstanceSpecific).
instanceSpecificDesc optionsAndLabels: self buildOptionsAndLabels.
"instanceSpecificDesc options: self buildOptions."
A variation, to have all the descriptions documented on the class side, is as follows:
description
| desc customizedDesc |
desc := super description copy.
customizedDesc := desc detect: [:each | each label = 'Customized'].
customizedDesc options: self customOptions.
^ desc
Thanks Yanni,
this came to mind as well. I was asking if there is a better idea to achieve the same.
Norbert