<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"><<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>></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 >> #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>
"TBar unload" ought to flatten TBar's methods, and not TBaz's.<br></blockquote><div><br></div><div>Well, #unload is a bit of a misnomer. MCPackage>>unload does what it says, but most implementors don'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>>flatten were implemented per Tobias' suggestion, then Trait>>unload could call that. </div><div><br></div><div>Colin</div></div></div></div>