<div dir="ltr">Hi John-Reed,<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 26, 2018 at 8:33 AM, John-Reed Maffeo <span dir="ltr"><<a href="mailto:jrmaffeo@gmail.com" target="_blank">jrmaffeo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">The value returned from "Smalltalk platformName" on  the 64 bit 5.2A image is Win32. Does this matter?</div></blockquote><div><br></div><div>Alas it does :-(.  There is much code in the system that explicitly tests for 'Win32', for example in various implementations of clipboardInterpreterClass.  If the 64-bit VM were to report, more accurately, Win64, then lots of code would break.</div><div><br></div><div>Maybe at a major release we could fix this, but when this issue surfaced (May 2017, see commit ca7e8db32835f5d2489ebddc7e14a51c9bbd4697), I chose to </div><div>- change getSystemAttribute: 1005 (the Windowing system name) to answer Windows instead of Win32</div><div>- keep getSystemAttribute: 1001 (the primary OS name) answering Win32</div><div><br></div><div><br></div><div>I guess a prudent way to deal with this for the moment is to implement SmalltalkImage>>is32BitWindows &  SmalltalkImage>>is64BitWindows (along with some other useful ones) to insulate clients from the details of the getSystemAttribute: interface, and then later we can try and remedy the situation.</div><div><br></div><div>In fact, if there are any volunteers motivated enough it would be really nice to see code like</div><div><br></div><div><div>clipboardInterpreterClass</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>| platformName osVersion |</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>platformName := Smalltalk platformName.</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>osVersion := Smalltalk osVersion.</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>(platformName = 'Win32' and: [osVersion = 'CE']) </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>ifTrue: [^NoConversionClipboardInterpreter].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>platformName = 'Win32' ifTrue: [^UTF8ClipboardInterpreter].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>platformName = 'Mac OS' ifTrue: [^MacShiftJISClipboardInterpreter].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>^platformName = 'unix' </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>ifTrue: </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>[(ShiftJISTextConverter encodingNames includes: X11Encoding getEncoding) </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                             </span>ifTrue: [MacShiftJISClipboardInterpreter]</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                              </span>ifFalse: [UnixJPClipboardInterpreter]]</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>ifFalse: [ NoConversionClipboardInterpreter ]</div></div><div><br></div><div>rewritten to more closely resemble</div><div><br></div><div><div>clipboardInterpreterClass</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>Smalltalk os isWindows ifTrue:</div><div><span style="white-space:pre">        </span><span style="white-space:pre">     </span>[^Smalltalk os isWindowsCE</div><div><span style="white-space:pre">    </span><span style="white-space:pre">     </span><span style="white-space:pre">     </span>ifTrue: [NoConversionClipboardInterpreter]</div><div><span style="white-space:pre">    </span><span style="white-space:pre">     </span><span style="white-space:pre">     </span>ifFalse: [UTF8ClipboardInterpreter]].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  Smalltalk os isMacOSX</span> ifTrue:</div><div><span style="white-space:pre">        </span><span style="white-space:pre">     </span>[^MacShiftJISClipboardInterpreter].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>Smalltalk os isUnix ifTrue: </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span>[^(ShiftJISTextConverter encodingNames includes: X11Encoding getEncoding) </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                    </span>ifTrue: [MacShiftJISClipboardInterpreter]</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>ifFalse: [UnixJPClipboardInterpreter]].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        ^</span>NoConversionClipboardInterpreter</div></div><div><br></div><div>or</div><div><br></div><div><div><div>clipboardInterpreterClass</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> (</span>Smalltalk os isWindows</div><div><span style="white-space:pre">        and: [</span>Smalltalk os isWindowsCE not]) ifTrue:</div><div><span style="white-space:pre"> </span><span style="white-space:pre">     </span>[^ UTF8ClipboardInterpreter].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  Smalltalk os isMacOSX</span> ifTrue:</div><div><span style="white-space:pre">        </span><span style="white-space:pre">     </span>[^MacShiftJISClipboardInterpreter].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>Smalltalk os isUnix ifTrue: </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span>[(<span style="white-space:pre">Smalltalk os isMacOSX</span></div><div><span style="white-space:pre"></span><span style="white-space:pre">           or: [</span>ShiftJISTextConverter encodingNames includes: X11Encoding getEncoding]) ifTrue:</div><div><span style="white-space:pre">                        </span>[^MacShiftJISClipboardInterpreter]</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              ^</span>UnixJPClipboardInterpreter].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> ^</span>NoConversionClipboardInterpreter</div></div><div><br></div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>C:\Smalltalk\Squeak5.2alpha-<wbr>18110-64bit-201804030952-<wbr>Windows\Squeak5.2alpha-18110-<wbr>64bit\Squeak5.2alpha-18110-<wbr>64bit.1.image<br></div><div><div>Squeak5.2alpha</div><div>latest update: #18110</div><div>Current Change Set: BBCRR-RestartAt5.2alpha</div><div>Image format 68021 (64 bit)</div></div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>- jrm</div></font></span></div></blockquote></div><br><br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>