<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jan 11, 2014 at 9:19 AM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span> wrote:<br>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A second time, with my brain in gear. It is possible to make this<br>
actually unload the Trait and do something useful: flatten the Trait<br>
into all its users. Trait class &gt;&gt; #removeAllTraits does this when<br>
Traits is unloaded. One tricky thing is that #removeAllTraits flattens<br>
_all_ Traits used by a class. So if class Foo uses TBar and TBaz,<br>
&quot;TBar unload&quot; ought to flatten TBar&#39;s methods, and not TBaz&#39;s.<br></blockquote><div><br></div><div>Well, #unload is a bit of a misnomer. MCPackage&gt;&gt;unload does what it says, but most implementors don&#39;t remove themselves from the system, they just prepare to be removed. That typically means unregistering from menus or flaps, cancelling notifications and so on. </div>
<div><br></div><div>So if Trait&gt;&gt;flatten were implemented per Tobias&#39; suggestion, then Trait&gt;&gt;unload could call that. </div><div><br></div><div>Colin</div></div></div></div>