-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on_enter_{state} does not excute automatically #6
Comments
It wouldn't take much work to add that behavior, but I'm not sure how I feel about it. Mainly I worry about feature creep if we start doing things like scanning the data model for already-defined callbacks, etc. It feels a bit inelegant to me to push some of the FSM logic into the data object. That said, I don't feel strongly about it, so let's leave this issue open for now, and if other people weigh in with strong opinions one way or the other, we can re-evaluate. |
+1 I think it would a great idea for on_enter_ and on_exit_ methods to be detected in the model and executed during transitions, Methinks it would make the code a whole lot more readable |
Okay, then I'm sold. Does someone want to take a stab at a PR? If not, I should be able to get to it in a few days. |
I'll do it and send you a PR |
Great! |
fixed #6: on_enter_{state} does not excute automatically
I found on_enter_{state} excute only if I set the on_enter=xxx in defination of state. I think the code below is natural, but it can not work. Do you think it should be supported?
The text was updated successfully, but these errors were encountered: