<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">El 26/4/22 a las 14:49, Hilaire
Fernandes via Cuis-dev escribió:<br>
</div>
<blockquote type="cite"
cite="mid:22630e44-3ab9-b388-dab7-5fc8d7356e75@drgeo.eu">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
To overcome the limitation of Preference mode, we could have
subclasses of Preference, each specialized in one form of
preference model: list, free text, closure, boolean, integer,
integer in an interval, color, etc. Each one could be then
extended in a third party package with the appropriate widget to
edit its content.<br>
</blockquote>
<p>Or .. perhaps having a 'preferenceType' slot would do, with a
Symbol denoting the preference type. Then it would be up to the
tools to use that effectively.</p>
<p>In my PreferenceBrowser, the right widget is created following
the Visitor design pattern. <br>
</p>
<p>If a Symbol for the preference type is not good enough, instead
of subclassing Preference, you could have a PreferenceType class
and subclasses, and tools create widgets using a Visitor.<br>
</p>
<blockquote type="cite"
cite="mid:22630e44-3ab9-b388-dab7-5fc8d7356e75@drgeo.eu"><b>Preferences.
</b>This is where the preferences are stored. The behavior is only
in the class side, with two class variables. For me there is a
concern with the responsibilities. For example there are methods
to set the particular state of a Preference instance. For example
#forTouch. I don't think it belongs there. In short the class is a
bit a mess, 167 methods. <b>Opinion?</b><br>
</blockquote>
<blockquote type="cite"
cite="mid:22630e44-3ab9-b388-dab7-5fc8d7356e75@drgeo.eu">
<ul>
<li>DictionaryOfPreferences - Hold the Preference instances.<br>
</li>
</ul>
</blockquote>
One of the problems at the moment is that there's no way of listing
all available preferences, as preferences can be created on the fly
just with a symbol. I know that that flexibility is handy, but
that's inconvenient for the tools. It would be nice if we could make
it so that all preferences available can be listed some how.<br>
<blockquote type="cite"
cite="mid:22630e44-3ab9-b388-dab7-5fc8d7356e75@drgeo.eu">
<ul>
<li> </li>
<li>Parameters - Unclear. <b>Opinion?</b><br>
</li>
</ul>
<p>The way to query the preferences is what make the class method
numerous in Preferences. Worst, in the base system there are
Preferences methods for packages absent in the system, for
example. The specific preferences instances should be
instantiated in these packages, in the ad-hoc initialize class
method, or so. <b>Opinion?</b><br>
</p>
<p>Querying a Preference instance with a symbol could make
Preferences much less cumbersome. Preferences for:
#soundsEnabled, Preferences value: #soundsEnabled, etc. <b>Opinion?</b><br>
</p>
<p>The perspective is also Preferences used by third-party
Application.</p>
<p>There is more to write but keep it for later.</p>
<p>Hilaire<br>
</p>
--
<pre class="moz-signature" cols="72">GNU Dr. Geo
<a class="moz-txt-link-freetext" href="http://drgeo.eu" moz-do-not-send="true">http://drgeo.eu</a>
<a class="moz-txt-link-freetext" href="http://blog.drgeo.eu" moz-do-not-send="true">http://blog.drgeo.eu</a></pre>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
<p><br>
</p>
</body>
</html>