[squeak-dev] Traits in Trunk - how to remove a trait from a class?

Chris Cunningham cunningham.cb at gmail.com
Thu Oct 18 23:19:01 UTC 2012


Hi.

I've recently been playing around/using Traits in squeak.  I am
building a parser, and wanted to capture parts of the source that I
couldn't parse and attach it to the most recently parsed part of the
source.  I used Traits to implement this (as opposed to making all the
AST classes sub-class a master class to handle this, or adding these
methods to all of the classes just to handle this temporary function),
and it worked really well.  Well enough I might try using traits for
other uses going forward.

However, I had as an original intent to remove the Trait from these
classes in the future, but I can't figure out how to do this at all in
the tools (or with the code) currently in Squeak.  I could file out
the code and remove the trait parts there, remove the classes from the
system, and file in the modified code, but that seem way to manual for
my purposes.

Is there a way (UI, code) to make a class NOT use any traits after a
class has a Trait assigned to it?

-Chris


More information about the Squeak-dev mailing list