<div dir="ltr">Tobias,<div><br></div><div>The application I am building uses #SystemWindow. The window has a model which contains the application program logic. One of the methods in my model wants to access the #SystemWindow so I gave it a name. When I tried to access the system window by name I got the label of the window and not the name  I gave it (I was astonished!). As I dug through the code, I saw that the #knownName methods in #Morph and #SystemWindow return different values. </div><div><br></div><div>Note: I am still a newbie andMorphic has been a mystery to me for a long time .</div><div><br></div><div>I can work around the issue, but I was surprised, and confused by the fact that I was not getting the result I expected when I tried to access my application system window by the  name I had given it. My design is probably bollocks and I don't really need to access the system window from the model, but I thought it was something deserved review.</div><div><br></div><div><a href="http://wiki.c2.com/?PrincipleOfLeastAstonishment">http://wiki.c2.com/?PrincipleOfLeastAstonishment</a><br></div><div><br></div><div>Thanks for taking and interest,</div><div><br></div><div>-jrm</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 12, 2017 at 5:51 PM, Tobias Pape <span dir="ltr"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
"SystemWindow #knownName violates principle of least astonishment"<br>
<br>
Care to explain?<br>
<br>
Best regards<br>
        -Tobias<br>
<div><div class="h5"><br>
> On 12.12.2017, at 22:33, John-Reed Maffeo <<a href="mailto:jrmaffeo@gmail.com">jrmaffeo@gmail.com</a>> wrote:<br>
><br>
> SystemWindow<br>
> knownName<br>
><br>
> ^label<br>
><br>
> ___________<br>
><br>
> Morphic<br>
> knownName<br>
>       "answer a name by which the receiver is known, or nil if none"<br>
>       ^ extension ifNotNil: [extension externalName]<br>
><br>
> _____________<br>
><br>
> I modified and tested the attached.<br>
><br>
> -jrm<br>
</div></div>> <SystemWindow-knownName.st><br>
<br>
<br>
</blockquote></div><br></div>