Searching a solution for double states for all objects

Frederic Pluquet fpluquet at ulb.ac.be
Sat Mar 10 11:53:20 UTC 2007


Hello,

I work on a tool in Squeak where all objects can be in two different states.
A lot of methods depend on the object'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.

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...

A solution on the bit level : it must be done using a bit in each object ?

Can I do that ? And, if I can, how I can do that ?

Do you have some other ideas ?

Kind regards,

Fréd

-- 
Frédéric Pluquet
Université Libre de Bruxelles (ULB)
Assistant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070310/b94b38cf/attachment.htm


More information about the Squeak-dev mailing list