<body><div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
Looks like several changes to me. :)<div><br></div><div>Bert thinks that we should just create a helper object as a result of #userInterfaceTheme that captures the sending object and handles the DNU code. There would be no need for having "scope" anymore and client code can safely store the result of #userInterfaceTheme and pass around.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 22.09.2017 12:39:24 schrieb H. Hirzel <hannes.hirzel@gmail.com>:</p>Stéphane
<br>
<br>Could you please summarize in one mail which changes to the
<br>UserInterface theme mechanism you propose and why you think that
<br>should be done?
<br>
<br>--HH.
<br>
<br>On 9/19/17, Stéphane Rollandin <lecteur@zogotounga.net> wrote:
<br>>> You do not know in advance how the object stored in a theme will be used
<br>>> by the client. It is not always a simple instVar write.
<br>>>
<br>>> Consider this example:
<br>>>
<br>>> slider borderColor: ((self userInterfaceTheme borderColorModifier
<br>>> ifNil: [ [:c | c adjustBrightness: -0.3] ]) value: aColor).
<br>>
<br>>
<br>> This can easily be folded back into the getter/setter pattern:
<br>>
<br>> BorderedMorph>>borderColorModifier: aBlock
<br>> self borderColor: (aBlock value: self borderColor)
<br>>
<br>> and then
<br>>
<br>> self borderColor: aColor.
<br>> self getThemed: #borderColorModifier
<br>> ifNone: [:c | c adjustBrightness: -0.3]
<br>>
<br>>
<br>> So I guess it's down to a design choice. I would vote for consistency of
<br>> pattern, and having everything written in getter/setter pairs.
<br>>
<br>>
<br>> Best,
<br>>
<br>>
<br>> Stef
<br>>
<br>>
<br></lecteur@zogotounga.net>
</blockquote>
</div></body>