<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Christoph --<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Do we actually need identity (#==) instead of equality here?</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">The ObjectExplorer dynamically constructs associations/bindings for its contents. Equality would not work because it would mix up stuff like "#color -> Color white" etc.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">In general, I think that the widget must use #== to avoid those issues.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">As opposed to this, #selectPath:in: uses #=.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Because that interface decouples state/representation from identity to be usable in clients.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">I would vote for #= in all three places</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Nope. That would make it really hard for models to communicate changes and selection. Identity is key here.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div>
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 26.10.2021 19:49:58 schrieb christoph.thiede@student.hpi.uni-potsdam.de <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">
Hi all!<br>
<br>
I am just fixing a bug in the PluggableTreeMorph and was stumbling upon the fact that in #updateFromChangedObject:, items are compared by identity, which makes it harder in the context of a DirectoryChooserDialog to indicate the relevant instance (i.e., you cannot use #containingDirectory which would create a new copy).<br>
<br>
Do we actually need identity (#==) instead of equality here? Next to #updateFromChangedObject:, also #getCurrentSelectionItem is using #==. As opposed to this, #selectPath:in: uses #=. Unless you have any counter arguments, I would vote for #= in all three places to delegate equality control to the domain objects that are contained in the tree morph.<br>
<br>
Best,<br>
Christoph<br>
<br>
<br>
<span style="color: #808080">---<br>
</span><i><span style="color: #808080">Sent from </span></i><i><u><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><span style="color: #808080">Squeak Inbox Talk</span></a></u></i>
</div></blockquote></div>