[squeak-dev] The Trunk: Traits-cwp.301.mcz

Colin Putney colin at wiresong.com
Sat Jan 11 15:58:59 UTC 2014


On Sat, Jan 11, 2014 at 9:19 AM, Frank Shearar <frank.shearar at gmail.com>wrote:


> A second time, with my brain in gear. It is possible to make this
> actually unload the Trait and do something useful: flatten the Trait
> into all its users. Trait class >> #removeAllTraits does this when
> Traits is unloaded. One tricky thing is that #removeAllTraits flattens
> _all_ Traits used by a class. So if class Foo uses TBar and TBaz,
> "TBar unload" ought to flatten TBar's methods, and not TBaz's.
>

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.

So if Trait>>flatten were implemented per Tobias' suggestion, then
Trait>>unload could call that.

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140111/54045276/attachment.htm


More information about the Squeak-dev mailing list