Hi Marcus,

Thanks for your reply - very much appreciated.

This is the approach I’ve taken and so far so good :)

Cheers,

J

> On 3 Nov 2021, at 12:41 am, Marcus Denker <marcus.den...@inria.fr> wrote:
> 
> You can just create
> 
>> On 27 Oct 2021, at 11:07, Jupiter Jones <jupiter.jo...@mail.com> wrote:
>> 
>> Does anyone know how to remove a trait programatically?
>> 
> 
> you could use the class installer / class builder, e.g. imagine you have:
> 
> 
> Object subclass: #MyVisitor
>       uses: TRBProgramNodeVisitor
>       instanceVariableNames: ''
>       classVariableNames: ''
>       package: ‘PackageTest’
> 
> 
> you can now remove the Trait with:
> 
> 
> ShiftClassInstaller make: [ :aClassBuilder | 
>               aClassBuilder fillFor: MyVisitor.
>               aClassBuilder traitComposition: {  }  
>                ]
> 
>       Marcus

Reply via email to