<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>I'm not sure whether I understand you correctly. The current documentation comment of Inspector >> #copyName says:</p>
<p><br>
</p>
<p></p>
<div>"Copy the name of the current variable, so the user can paste it into the <span style="font-size: 12pt;">window below and work with is.
<b>If collection, do (xxx at: 1).</b>"</span></div>
(emphasis mine)
<p></p>
<p><br>
</p>
<p>I like the feature and would never ask to remove it - but my question is, why do we have this edge case?</p>
<p>From the screenshot below, if you store 42 in the current selected field, copyName will give you: (self basicAt: 1).</p>
<p>But if you replace its content with '42' (a string) instead, copyName will give you: ((self basicAt: 2)
<u>at: 1</u>).</p>
<p><br>
</p>
<p>I can't find any #copyName implementation that handles this edge case outside of the inspectors. What is this edge case for? How helps it "store" the value?</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Dienstag, 17. Dezember 2019 12:14:39<br>
<b>An:</b> John Pfersich via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] Inspector "Copy name"</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Looks like that #copyName works similar to #storeOn:? There are 10 implementors of #copyName to learn from.
<div><br>
</div>
<div>I would rather not remove that feature. Instead, extract it to CollectionInspector to avoid that #isKindOf: check.
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
</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;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 16.12.2019 19:55:33 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div id="divtagdefaultwrapper" style="font-size: 12pt;color: #000000;font-family: Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>as you might know, I'm currently refactoring the inspectors (@Chris - the idea with InspectorFieldSpec was fabulous, it improves the overall design a lot!). One short question regarding the menu action "Copy name":</p>
<p><br>
</p>
<p><img size="179284" contenttype="image/png" id="img475181" style="max-width: 99.9%; user-select: none;" contextid="img983735" tabindex="0" src="cid:5e312cc2-b0cb-473f-b58c-a3a408c5dfc9"><!-- </img> --><br>
</p>
<p><br>
</p>
<p>As you can see in the screenshot, the current implementation has a weird edge case:</p>
<p><br>
</p>
<p>sel := ...</p>
<p><b><span style="font-size: 12pt">(self selection isKindOf: Collection)</span><br>
</b></p>
<p></p>
<div><b><span style="white-space:pre"></span>ifTrue: [sel := '(' , sel , ' at: 1)'].</b></div>
^ sel
<p></p>
<p><br>
</p>
<p>I cannot see any sense in it. In my eyes, it's just confusing. Can I remove that edge case?</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0, 0, 0);font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</span></div>
</div>
</div>
</div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>