<div>Got what I needed done (thanks Bert!) <span class="Apple-tab-span" style="white-space:pre">T</span>his is what I went with:</div><div><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>metaclass := Metaclass new</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>superclass: Some class;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>methodDictionary: MethodDictionary new;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>setFormat: Some class format;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>yourself.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>theme := metaclass new</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>superclass: Some;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>methodDictionary: MethodDictionary new;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>setFormat: Some format;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>yourself.</div>
<div><br></div><br><div class="gmail_quote">On Sun, Dec 19, 2010 at 10:14 AM, Hernán Morales Durand <span dir="ltr"><<a href="mailto:hernan.morales@gmail.com">hernan.morales@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Casey,<br>
<br>
Can you comment what's your use case for anonymous subclass? Or maybe<br>
post some example/testing code?<br>
Cheers,<br>
<br>
2010/12/18 Casey Ransberger <<a href="mailto:casey.obrien.r@gmail.com">casey.obrien.r@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hello all,<br>
> I want to make an anonymous subclass, or a copy of (either way) a subclass<br>
> of Object.<br>
> I've been googling around looking for an example of an anonymous subclass. I<br>
> haven't had luck with anything I've found. It's possible that there's<br>
> something I'm missing conceptually, because I've read through various<br>
> examples, but they all seem to do directly with Behavior or Class. I tried<br>
> various combinations of things with both of the approaches I found. Some of<br>
> them hung the image, with others the #primitiveChangeClassTo: would fail. I<br>
> read the comment there, and am aware that using it is reckless behavior.<br>
> I see that Smalltalk compactClassesArray gives me a list of the compact<br>
> classes. I don't seem to understand the format part. I've noticed that<br>
> certain classes (e.g. Array) are declared "variable subclasses" but that's<br>
> it. I googled and didn't turn up anything that seemed to help me grok it.<br>
> Tried:<br>
> Class format. "answers 148" Head scratch; think. ^self shrug<br>
> Any pointers?<br>
> --<br>
> Casey Ransberger<br>
><br>
</div></div><div class="im">> _______________________________________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
><br>
><br>
<br>
</div>--<br>
Hernán Morales<br>
Information Technology Manager,<br>
Institute of Veterinary Genetics.<br>
National Scientific and Technical Research Council (CONICET).<br>
La Plata (1900), Buenos Aires, Argentina.<br>
Telephone: +54 (0221) 421-1799.<br>
Internal: 422<br>
Fax: 425-7980 or 421-1799.<br>
<div><div></div><div class="h5">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Casey Ransberger<br>