Hello,<br><br>I work on a tool in Squeak where all objects can be in two different states. A lot of methods depend on the object&#39;s state. For the moment, I check which type are the value of the variables of the current object (because the state is linked with the variables values) but it is very expensive in time.
<br><br>A State pattern can be cool but adding an instance variable in the object is really not a good solution for me : all classes must be recompiled, taking time and some bugs appear... <br><br>A solution on the bit level : it must be done using a bit in each object ?
<br><br>Can I do that ? And, if I can, how I can do that ?<br><br>Do you have some other ideas ?<br><br>Kind regards,<br><br>Fréd<br><br>-- <br>Frédéric Pluquet<br>Université Libre de Bruxelles (ULB)<br>Assistant