Re: [Pharo-dev] Implementors of margins in GLMRubScrolledTextBrick

2017-12-16 Thread Stephane Ducasse
Ok so since I paid attention and rewrote all the margins: invocations
I think that my changes will not break

On Fri, Dec 15, 2017 at 9:32 PM, Stephane Ducasse
 wrote:
> 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  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  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
>>>
>>



Re: [Pharo-dev] Implementors of margins in GLMRubScrolledTextBrick

2017-12-15 Thread Stephane Ducasse
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  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  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
>>
>



Re: [Pharo-dev] Implementors of margins in GLMRubScrolledTextBrick

2017-12-14 Thread Aliaksei Syrel
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  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/GLMRubScrolledTextBr
> ick-relies-on-dnu-delegation
>
> Best regards,
> Henrik
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>
>


Re: [Pharo-dev] Implementors of margins in GLMRubScrolledTextBrick

2017-12-09 Thread Henrik-Nergaard
>>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



[Pharo-dev] Implementors of margins in GLMRubScrolledTextBrick

2017-12-09 Thread Stephane Ducasse
Hi

I'm working on 16969 https://pharo.fogbugz.com/f/cases/16969/
which is basically cleaning the use of rectangle instead of using
Margin. Now I'm surprised because
GLMRubScrolledTextBrick>>withoutMargins uses self margins: but I
cannot find the method.  Did I misses something?

I rewrote it as


withoutMargins
self margins: (0@0) asMargin

but I'm still curious.

Stef