Menu

#1 enter() is not called for the initial State

v1.0 (example)
wont-fix
nobody
None
5
2016-03-10
2010-01-15
Anonymous
No

Version : swingstates_0.2_08_04_16
When the state machine initializes, it enters the initial state but does not seem to call its enter() method ?
In my application (source files in the attached zip), the initial state is called 'p1Turn'.
it's enter() method is overridden :
@Override
public void enter() {
highlightPlayer1();
}

However, it is never fired at the state machine initialization.
It is correctly fired for other state entry so the issue must be specific to initialisation.

Discussion

  • Nobody/Anonymous

    zipped source files

     
  • Caroline Appert

    Caroline Appert - 2016-03-10

    Thank you. Specifying a behavior when the machine initializes is the purpose of the method init() in the StateMachine class.

     
  • Caroline Appert

    Caroline Appert - 2016-03-10
    • status: open --> wont-fix
    • Group: --> v1.0 (example)
     

Log in to post a comment.

MongoDB Logo MongoDB