[Pharo-project] adding traits programatically

Esteban Lorenzano estebanlm at gmail.com
Thu Feb 11 09:11:38 EST 2010


Hi,
I'm trying to add/remove traits from a class programatically and I have 
a problem...
What I'm doing is, for instance:

NSProxy traitCompostition: TNSLogConsole.

and

NSProxy traitComposition: TNSLogNone.

(as a way to replace logging strategies)... but nothing happens... 
bah... in the browser the class definition is affected, but the 
application still works as if none changed... do I need to force a 
class recompilation after changing trait composition? what I'm doing 
wrong?

Cheers,
Esteban






More information about the Pharo-dev mailing list