<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi, <br>
    </p>
    <p>Below some important reflections based on the application of
      PreferenceNG to DrGeo's preferences.<br>
    </p>
    <p>In the current PreferenceNG design (true as well for the legacy
      preference design) we are not exploiting the full potential of the
      category attribute.</p>
    <p>Indeed, there is no logical reason we can't have two preferences
      with the same name but under two different categories. In the
      current design it is not possible.<br>
    </p>
    <p>This is a problem that could arise quickly when loading two
      packages developed separately. The two developers may have both
      declared a preference named #textColor.</p>
    <p>In package 'Zork':<br>
    </p>
    <p><font face="monospace"><font color="#97082d">    PreferenceNG <br>
                  name: #textColor<br>
                  category: #Zork<br>
                  value: #red</font><br>
      </font>
    </p>
    <font face="monospace">
    </font>
    <p>and package 'Zul':<br>
    </p>
    <p><font face="monospace" color="#97082d">    PreferenceNG <br>
                name: #textColor<br>
                category: #Zul<br>
                value: #black</font><br>
    </p>
    <p>When both packages are installed, we have a preference name
      clash.<br>
    </p>
    <p><br>
    </p>
    <p>Exploiting category as a preference domain could reduce the
      complexity of preference name. Observe how these two preferences:<br>
    </p>
    <p><font face="monospace" color="#97082d">    PreferenceNG <br>
                name: #DrGeoPointColor<br>
                description: 'Default colour of a point.' translated <br>
                category: #DrGeoPoint <br>
                type:  (DrGTypeColor with: #DrGeoPointColor)<br>
                value: Color red<br>
      </font></p>
    <p><font face="monospace" color="#97082d">    PreferenceNG <br>
                name: #DrGeoSegmentColor<br>
                description: 'Default colour of a segment.' translated <br>
                category: #DrGeoPoint <br>
                type:  (DrGTypeColor with: #DrGeoSegmentColor)<br>
                value: Color black</font></p>
    <p>could be better named as:<br>
    </p>
    <p><font face="monospace" color="#97082d">    PreferenceNG <br>
                name: #color<br>
                description: 'Default colour of a point.' translated <br>
                category: #DrGeoPoint <br>
                type:  (DrGTypeColor with: #DrGeoPoint:color)<br>
                value: Color red<br>
      </font></p>
    <p><font face="monospace" color="#97082d">    PreferenceNG <br>
                name: #color<br>
                description: 'Default colour of a segment.' translated <br>
                category: #DrGeoSegment <br>
                type:  (DrGTypeColor with: #DrGeoSegment:color)<br>
                value: Color black</font></p>
    <p>In another email I will propose how to adapt the class and its
      protocol.<br>
    </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>