<html><head><style id="css_styles" type="text/css"><!--blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
table { border-collapse: collapse; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] { list-style-position: inside;}
body { font-family: 'Segoe UI'; font-size: 12pt; }
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
--></style></head><body><div>I assume the example should go:</div><div><br /></div><div>set := Set newFrom: #(1 2 3 4).
</div><div>oc := OrderedCollection new.
</div><div>oc setContents: set.
</div><div>oc</div><div><br /></div><div>Hmm, #<span>setContents: assumes an array argument but doesn't check... In theory </span><span>#</span><span>setContents:</span><span> might want to convert the supposed array argument </span><span>anArray</span><span> to an array by `anArray asArray`. I don't know why it doesn't though :) Feels odd.</span></div>
<div style="clear:both"><br /></div>
<div><br /></div>
<div>
<div>On 07-Jul-24 4:26:58 PM, "Mark Volkmann via Cuis-dev" <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:</div></div><div><br /></div>
<div id="x7379af1aeca74b2"><blockquote cite="CAFfRWnWrsjuRSgCBuNEOtujJYxx75x+J=EsnJ-rGThaFMX+OjA@mail.gmail.com" type="cite" class="cite2">
<div dir="ltr">Selecting the following code in a Workspace and running "Print it" results in the error "Instances of Set are not indexable". I understand why I get that error. But I'm wondering if I should get the error when I send the message `setContents:` to `OrderedCollection` because it could detect that I have set the contents to an incompatible collection type.<div><br /></div><div><font face="monospace">set := Set newFrom: #(1 2 3 4).<br />oc setContents: s.<br />oc</font><br clear="all" /><div><br /></div><span class="gmail_signature_prefix">-- </span><br /><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8000001907349px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>
</body></html>