FiniteStateMachine's assumption about first property is non-standard

derrell at samba.org derrell at samba.org
Tue Apr 17 20:20:04 GMT 2007


"John Jorgensen" <jorgensen.john at gmail.com> writes:

> I've noticed a Minor issue in swat as a consequence of a class
> exercise (I'm trying to semi-automatically generate graphviz code for
> drawing pictures of Swat finite state machines).
>
> The implementation of start states in  qx.util.fsm.FiniteStateMachine
> depends on an assumption which isn't warranted by the JavaScript
> definition, though the assumption is probably fulfilled by most
> browsers you care about.
>
> Looking for the Start states for my graphs, I found the comment in
> qx.util.fsm.FiniteStateMachine reading:
>
> "The starting state is defined as the first state added
>   to the finite state machine."

Thanks, John.  I'll check in a fix for this in qooxdoo's trunk, and when
qooxdoo 0.7 is released and I upgrade SWAT to use it, we'll have the fix here
too.

The comment you found in the code still applies, but I'm now tracking the
first state in a separate variable rather than depending on finding it as the
first value discovered by iterating the object properties.

Cheers,

Derrell


More information about the samba-technical mailing list