<div dir="ltr"><div>David and Subbu,</div><div>Thank you for your explanations, but ... but we have characters in the image. Having a characters in the image means that Character has instances. If alInstances method cannot report about them, it shall fire exception perhaps, or, name allInstances must be changed to something else, isn't it?<br></div><div>regards,</div><div>Vaidotas<br></div><div><br></div><div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 29, 2020 at 10:33 AM K K Subbu <<a href="mailto:kksubbu.ml@gmail.com">kksubbu.ml@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 29/02/20 12:26 AM, Vaidotas Didžbalis wrote:<br>
> Hello,<br>
> Character allInstances size=0. Why?<br>
<br>
Good observation!<br>
<br>
allInstances gives a list of objects of the given class stored in Object <br>
Memory. Character and SmallInteger are immediate values (type 7), stored <br>
directly in an oop, so they have no instances in Object Memory. You get <br>
other such types with:<br>
<br>
Class allSubInstances select: [:c | c instSpec = 7]<br>
   an OrderedCollection(SmallInteger SmallFloat64 Character)<br>
<br>
See the comment of Behavior>>instSpec for other instance types.<br>
<br>
HTH .. Subbu<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div></div></div>