2009/11/17 Rickard Öberg <[email protected]> > On 2009-11-17 21.08, Jacek Sokulski wrote: > >> Role2Mixin{ >> @This DerivedState3 state; >> >> void doSomething(){ >> state.value().set("XXX") // WILL CHANGE STATES IN ALL ROLES! >> .... >> } >> > > Yup, that's true. Since it's the same property in all of the cases (=same > method), the value is going to be shared. To me that's a feature! Are you > seeing any potential problem with it?
In cases where I want to have the state private per role, e.g. Person can have two roles HasName and HasSpouseName and implementation for both use NameState. Jacek
_______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

