[squeak-dev] The Trunk: MorphicExtras-cmm.201.mcz

Eliot Miranda eliot.miranda at gmail.com
Fri Dec 16 19:32:10 UTC 2016


Hi Bert,

On Tue, Dec 13, 2016 at 11:16 AM, Bert Freudenberg <bert at freudenbergs.de>
wrote:

> On Tue, Dec 13, 2016 at 8:33 AM, Chris Muller <asqueaker at gmail.com> wrote:
>
>> I guess its still there..  but apparently that trick wasn't working
>> for this attribute.
>
>
> Ah, I see. DNU used to return false if the pref was not found, which was a
> good default behavior. Marcel changed it to return nil instead, which I
> guess broke some code. Then Tobias changed it to raise an exception.
>
>
>> I was only interested in getting the basic functionality working
>> again, I don't know all what access patterns Etoys is using.
>>
>
> Sure, and thank you :)
>
> Instead of checking for "understands" we should use valueOfFlag: (which
> defaults to false) to get back the old behavior. Or we recreate the
> preference. Or we make it into a "pragma" preference on some class (which
> seems to be the preferred way nowadays, even though it leads to an
> explosion of pref accessor methods?)
>

Well, the current scheme leads to an explosion of preference accessor
methods in Preference class.  I think the pragma style is far more
preferable to this.  At least one doesn't have the System package being
marked as dirty just because preferences have been accessed.

I agree that a default MNU that answers false, and doesn't create an
accessor method, is a good default.  Although it does suffer the
disadvantage that a misspelled reference will simply go unnoticed,
defaulting to false.


>
> What would be best?
>

Not sure.  Add a preference to log "anonymous" preference accessors to the
Transcript ? ;-)  Only kidding.


>
> - Bert -
>
> On Mon, Dec 12, 2016 at 3:20 PM, Bert Freudenberg <bert at freudenbergs.de>
>> wrote:
>> >
>> >
>> > On Wed, Dec 7, 2016 at 11:06 AM, <commits at source.squeak.org> wrote:
>> >>
>> >> Chris Muller uploaded a new version of MorphicExtras to project The
>> Trunk:
>> >> http://source.squeak.org/trunk/MorphicExtras-cmm.201.mcz
>> >>
>> >>
>> >> +       ((Preferences canUnderstand: #useBiggerPaintingBox) and: [
>> >> Preferences useBiggerPaintingBox ]) ifTrue: [left := left  - (( self
>> width *
>> >> 1.5)- self width)].
>> >> -       Preferences useBiggerPaintingBox ifTrue: [left := left  - ((
>> self
>> >> width
>> >
>> >
>> >
>> > Why did we remove Preferences class>>doesNotUnderstand:?
>> >
>> > - Bert -
>> >
>> >
>> >
>> >
>>
>>
>
>
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161216/59dd4cbe/attachment.html>


More information about the Squeak-dev mailing list