<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>The Preference model in Cuis, to my current knowledge, is
composed of two classes: Preference<b>s</b> and Preference. I will
write down the analysis of how it is working<br>
</p>
<p><b>Preference.</b> Its instance defines one preference facet, its
initial design is clearly targeted for boolean but there are use
case for non boolean. There instances variables are:</p>
<ul>
<li>name helpString - symbol name and detailed description<br>
</li>
<li>value defaultValue - current value and a default value. Most
value are boolean but some Preference instance comes with a non
boolean value, without possibility to know its type, the method
to toggle the value then breaks.<br>
</li>
<li>categoryList - an array of selector describing the categories
the preference belongs to. I think one selector is enough. <b>Opinion?</b><br>
</li>
<li>changeInformee changeSelector - an object and selector to
inform of value changed. I don't think it is good design, it is
limited to one object and it should use triggerEvent. <b>Opinion?</b></li>
</ul>
<p>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>
</p>
<p><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>
</p>
<ul>
<li>DictionaryOfPreferences - Hold the Preference instances.<br>
</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">http://drgeo.eu</a>
<a class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
</body>
</html>