Lee Jenkins schreef:

I had to implement the State Pattern a while back and it was a pain because in order to avoid circular references, all the different state pattern objects had to be in the same unit. That is of course if you want to refer to the new State object's class when transitioning.

Transitioning is done in the implementation and the abstract state doesn't have to know about its descendant states. Circular references in the implementation are allowed, so I don't see the problem.

Vincent

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to