<div dir="ltr">Hi Subbu,<div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 16, 2017 at 10:01 PM, K K Subbu <span dir="ltr"><<a href="mailto:kksubbu.ml@gmail.com" target="_blank">kksubbu.ml@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"><br>
On Wednesday 17 May 2017 03:50 AM, GitHub 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">
Change getSystemAttribute: 1005 (the Windowing system name) to answer 'Windows'<br>
insrtead of 'Win32' (we are stuck with answering 'Win32' on 'Win64' unless we<br>
want to break /lots/ of image platform-dependent code).  If this breaks things<br>
then we'll have tio revert.  But fingers crossed it is not a problem; there are<br>
no uses of 1005 assuming other than 'X11' in a base Squeak image.<br>
</blockquote>
<br>
As a app (i.e. not a driver), vm deals with OS through APIs. Therefore, I feel it is better to retain 'Win32' and return 'Win64' for 64-bit. If it breaks code in 64-bit image, we can fix it in the image since 64b images are relatively new. Changing 'Win32' to Windows may break old images already in production :-(.<br></blockquote><div><br></div><div>Note that attribute 1001 was not changed and still answers 'Win32'. i only changed 1005, the windowing system name, to answer 'Windows' instead of 'Win32'.  I did this because the only use of parameter 1005 I could find was this one:</div><div><br></div><div><div>HandMorph>>compositionWindowManager</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>CompositionWindowManager ifNotNil: [^CompositionWindowManager].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>Smalltalk platformName = 'Win32' </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>ifTrue: [^CompositionWindowManager := ImmWin32 new].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>(Smalltalk platformName = 'unix' </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>and: [(Smalltalk windowSystemName) = 'X11']) </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                 </span>ifTrue: [^CompositionWindowManager := ImmX11 new].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>^CompositionWindowManager := ImmAbstractPlatform new</div></div><div><br></div><div>Notice how it uses Smalltalk platformName = 'Win32', which has not been changed (platformName = attribute 1001).  The only use of windowSystemName is (Smalltalk windowSystemName) = 'X11', so my change will not break this one example.  Please let's wait and see whether there are any other examples.  </div><div><br></div><div><br></div><div>BTW, I think the code would read much better as</div><div><br></div><div><div>HandMorph>>compositionWindowManager</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>CompositionWindowManager ifNotNil: [^CompositionWindowManager].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>Smalltalk windowSystemName = 'Windows' </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span>ifTrue: [^CompositionWindowManager := ImmWindows new].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Smalltalk windowSystemName = 'X11'</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>ifTrue: [^CompositionWindowManager := ImmX11 new].</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>^CompositionWindowManager := ImmAbstractPlatform new</div></div><div><br></div><div>etc.  And FWIW I would use a case statement that answered the class to use.</div><div></div></div><div class="gmail_extra"><br></div><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>