[Pharo-project] syntax highlighting for (stateful) traits (non-local methods)

Toon Verwaest toon.verwaest at gmail.com
Sun Apr 3 13:13:27 CEST 2011

> Do you mean coloring message sends in a trait's method? For self call that is not specified in the requirement?
I meant that if you look at a method coming from a trait inside of the 
class browser; while your browser is pointing at a class. Instance 
variables were colored red since they weren't found on the class. 
However, they came from the trait, so should have been colored in the 
scope of the trait. Now that's fixed. All methods are being colored in 
the scope where they are defined.
> Can you merge state? What happens with C.x uses T.x ? Methods of T will use T.x and methods of C will use C.x?
> Alexandre
At the moment you can't, but in our slot library we have alias slots. So 
that we could use to do the same tricks as with methods: required slots, 
provided slots, "defrosted slots", ...

So yes, at the moment C.x using T.x will have completely separate uses 
in methods, only dependent on where they are compiled. Traits related 
methods see the trait state, class related methods see the class state. 
I think it's more important to get that part working first; and to then 
start providing access, which is why I did it in this order.


More information about the Pharo-project mailing list