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

Bert Freudenberg bert at freudenbergs.de
Fri Dec 16 19:50:42 UTC 2016

On Fri, Dec 16, 2016 at 11:32 AM, Eliot Miranda <eliot.miranda at gmail.com>
> 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.

Well, only because SomeOneā„¢ changed the accessors generator to actually put
them into the package, when they used to be in their own "*autogenerated"

These accessor methods are only there to speed up the DNU, which is the
default handler. Maybe on Cog we don't even need the precompiled accessors.

>   I think the pragma style is far more preferable to this.

I think pragmas are good for finding preference declarations.

But having to implement preference storage over and over again is not the
best solution. But that's what the current pragma prefs require - a setter
and a getter and a class var and logic for initialization and if a class
has many prefs then maybe a prefs dictionary because too many class vars
are annoying etc. pp.

Having actual Preference objects managed by a Preferences class takes care
of all of that, once and for all.

> At least one doesn't have the System package being marked as dirty just
> because preferences have been accessed.

See above - that's a bug IMHO.

> 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.

True. Maybe in a dev image it indeed should raise an exception.

Btw, this is a good discussion :)

- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161216/fa6a6df7/attachment.html>

More information about the Squeak-dev mailing list