Skip to content

Conversation

@Jud
Copy link

@Jud Jud commented Jul 16, 2014

When TKStateMachine tries to determine if it can fire an event, it does:

[tkEventInstance.states containsObject: self.currentState];

If you haven't instantiated the current state with the exact TKState instance used when setting up the machine, this will always fail to fire events.

This fixes that issue.

When `TKStateMachine` tries to determine if it can fire an event, it does:

```
[tkEventInstance.states containsObject: self.currentState];
```
If you haven't instantiated the current state with the exact `TKState` instance used when setting up the machine, this will always fail to fire events.

This fixes that issue.
Code/TKState.m Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t this be a string comparison?

@Jud
Copy link
Author

Jud commented Jul 17, 2014

@blakewatters Fixed that comparison. Wasn't really using my brain on that one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When defining the isEqual: method, ou MUST also implement the hash method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants