Argh! I did not thought about it.
So it may means that my changes are breaking the system.
Aliaksei DNU is a ship way. The other way is as you expect I'm sure
adding a method that just does the delegation.
What we can do is to turn the DNU into a DNU compiling methods like
that after a while
we will have the method compiled and we will able to remove the DNU trick.

stef

On Thu, Dec 14, 2017 at 6:46 PM, Aliaksei Syrel <alex.sy...@gmail.com> wrote:
> Hi,
>
> GLMRubScrolledTextBrick is a wrapper around RubScrollTextMorph.
> I see that it is a common practice in Pharo to implement decorator / wrapper
> pattern using doesNotUnderstand:.
>
> Reference:
>   - AthensWrappedWorldDisplay
>   - DictionaryValueHolder
>   - MorphicTreeAdapter
>   - RubEditingArea
>   - RubParagraphDecorator
>
>   - RTShapeBuilder
>   - RTShowLabel
>
> Is there a better way to implement a decorator or a wrapper around the
> object with many api methods rather then doesNotUnderstand:?
>
> Cheers,
> Alex
>
> On 9 December 2017 at 17:45, Henrik-Nergaard <draag...@outlook.com> wrote:
>>
>> >>GLMRubScrolledTextBrick>>withoutMargins uses self margins: but I
>> cannot find the method.
>> This is because it is implemented in RubScrollTextMorph.
>> GLMRubScrolledTextBrick implements #doesNotUnderstand: to send it to the
>> rubric object.
>> see:
>>
>> https://pharo.fogbugz.com/f/cases/17888/GLMRubScrolledTextBrick-relies-on-dnu-delegation
>>
>> Best regards,
>> Henrik
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>>
>

Reply via email to