<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Hilaire,<br>
    <br>
    On 7/9/2022 6:00 AM, Hilaire Fernandes via Cuis-dev wrote:
    <blockquote cite="mid:707791d3-2868-9d04-e8ad-e09664461a8a@drgeo.eu"
      type="cite">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p><font size="4">Hi Juan, <br>
        </font></p>
      <p><font size="4">Since your update 5355 the accept: visitor is
          gone from the Preference class.</font></p>
      <p><font size="4">Although not used in the core image, it is
          needed to visit Preference in third party application. I copy
          and paste it below so you merge it back:</font></p>
      <p><font size="4">Preference>>accept: aVisitor<br>
              | visitMethod |<br>
              self isTypeAClass <br>
                  ifTrue: [ visitMethod _ ('visit', type name,
          'Preference:') asSymbol ]<br>
                  ifFalse: [visitMethod _ ('visit', type species
          asString, 'Preference:') asSymbol ].<br>
              ^ aVisitor perform: visitMethod with: self<br>
        </font></p>
      <p><br>
      </p>
    </blockquote>
    <br>
    Added it back. Apologies.<br>
    <br>
    <blockquote cite="mid:707791d3-2868-9d04-e8ad-e09664461a8a@drgeo.eu"
      type="cite">
      <p> </p>
      <p>Also I noted your edit of the type method:</p>
      <p>Preference>>type<br>
            (type inheritsFrom: CharacterSequence) ifTrue: [ type _
        CharacterSequence ].<br>
            ^ type</p>
      <p>It breaks the Preference behavior in DrGeo with my dedicated
        type objects (DrGTypeArrow, DrGTypePointShape, etc.), all
        subclasses of an Object. Indeed #inheritsFrom: is defined in
        Behavior not in Object.<br>
      </p>
    </blockquote>
    <br>
    I see. I pushed an update that does essentially the same, but should
    not break your code.<br>
    <br>
    <blockquote cite="mid:707791d3-2868-9d04-e8ad-e09664461a8a@drgeo.eu"
      type="cite">
      <p> </p>
      <p>I am wondering if it is needed because we all detect type?<br>
      </p>
    </blockquote>
    <br>
    People may set type String explicitly. Besides, many existing
    preferences have type String. That's why I also modified #type.<br>
    <br>
    <blockquote cite="mid:707791d3-2868-9d04-e8ad-e09664461a8a@drgeo.eu"
      type="cite">
      <p> </p>
      <p>Preference>>detectType: anObject<br>
        "When the type is not provided, we can try to deduce it "<br>
        <br>
            (anObject isKindOf: CharacterSequence) ifTrue: [
        ^CharacterSequence ].<br>
            ^ anObject class name<br>
                caseOf: {<br>
                    [#True] -> [Boolean].<br>
                    [#False] -> [Boolean].<br>
                    [#StrikeFont] -> [AbstractFont].<br>
                    [#TrueTypeFont ] -> [AbstractFont]<br>
                }<br>
                otherwise: [anObject class]</p>
      <p>I understand these changes are related to your utf-8 work in
        progress.<br>
      </p>
    </blockquote>
    <br>
    Yes. Now, and Utf8String may appear anywhere a String was expected.
    They are fully polymorphic and this should not create any problems.
    But then, in all places (in _almost_ all places) where type checking
    or conversions is done, an Utf8String must be accepted.<br>
    <br>
    BTW, the Utf8 stuff is mostly done. Only sorting (collation) needs a
    bit more work.<br>
    <br>
    <blockquote cite="mid:707791d3-2868-9d04-e8ad-e09664461a8a@drgeo.eu"
      type="cite">
      <p> </p>
      <p>Best</p>
      <p>Hilaire<br>
      </p>
    </blockquote>
    <br>
    Thanks,<br>
    <pre class="moz-signature" cols="72">-- 
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a class="moz-txt-link-freetext" href="https://independent.academia.edu/JuanVuletich">https://independent.academia.edu/JuanVuletich</a>
<a class="moz-txt-link-freetext" href="https://www.researchgate.net/profile/Juan-Vuletich">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a class="moz-txt-link-freetext" href="https://patents.justia.com/inventor/juan-manuel-vuletich">https://patents.justia.com/inventor/juan-manuel-vuletich</a>
<a class="moz-txt-link-freetext" href="https://twitter.com/JuanVuletich">https://twitter.com/JuanVuletich</a></pre>
  </body>
</html>