<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font size="4">This is the expected scenario, a Tool register
        with #when:send:to: message: <font face="monospace"
          color="#97082d">aPreference when: #preferenceChanged send:
          #notifyMe: to: aTool</font>.</font></p>
    <p><font size="4">The only exception is with system preferences, two
        events are listened by the PreferenceNG class:</font></p>
    <p><font size="4">To listen to change font:</font></p>
    <p><font size="4"><font face="monospace" color="#97082d">installFontPreferences<br>
              | myPref |<br>
              myPref _ PreferenceNG <br>
                  name: #guiElementsSize <br>
                  description: 'Size of the graphic intereface element'
          <br>
                  category: #gui <br>
                  type: #(tinyFonts verySmallFonts smallFonts
          standardFonts largeFonts veryLargeFonts hugeFonts)<br>
                  value: #standardFonts.<br>
              myPref when: #preferenceChanged send: #defaultFontSize:
          to: PreferenceNG.<br>
              "Trigger manually, the preference was instantiated with
          value, so no setter message sent"<br>
              myPref triggerEvent: #preferenceChanged with: myPref. </font><br>
      </font></p>
    <p><font size="4">and for Shout assignment character (not sure why I
        need to implement it, but it was implemented with side effect on
        the legacy Preference system:<br>
      </font></p>
    <p><font size="4" face="monospace" color="#97082d">    " Shout
        assignment character "<br>
            myPref _ PreferenceNG name: #assignmentGlyphSelector
        description: 'How should look like the assignment character?'
        category: #programming  type: #(useLeftArrow useAlwaysLeftArrow)
        value: #useLeftArrow.<br>
            myPref when: #preferenceChanged send: #assignmentGlyph: to:
        PreferenceNG.<br>
      </font></p>
    <p><font size="4"><br>
      </font></p>
    <p>I will do as your suggested, it will cover the current needs. We
      will see if future evolution is necessary.</p>
    <p>My idea was to save along the preferences, the registered action
      map, but it is likely overkill.<br>
    </p>
    <p>Thanks for the tips</p>
    <p>Hilaire<br>
    </p>
    <div class="moz-cite-prefix">Le 06/05/2022 à 10:38, Luciano
      Notarfrancesco a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAL5GDyrhCpHqofxJhvX6KE4XZuHUu29jvgoZ8EWsL5W1Ntrhpg@mail.gmail.com">
      <div><span style="border-color:rgb(0,0,0);color:rgb(0,0,0)">Hm. </span><span
          style="border-color:rgb(0,0,0);color:rgb(0,0,0)">I think the
          tools should be responsible of registering events for
          preference change notification, not the other way around. </span><span
          style="border-color:rgb(0,0,0);color:rgb(0,0,0)">If the
          preference doesn’t exist in the image, maybe we should assume
          the tool that was originally notified when the preference
          changed is not installed in the image.</span><br>
      </div>
      <div><br>
      </div>
    </blockquote>
    <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>