Skip to content

Conversation

dieterblancke
Copy link

@dieterblancke dieterblancke commented Aug 18, 2022

This should fix an IndexOutOfBoundsException that occurs when executing setActive with an index equal to the amount of widgets.

This error started occuring since this commit afaik: 60d3d21

@dieterblancke
Copy link
Author

@kevzlou7979 if you are able to, please clarify as to what the intention is here.

From the issue #998 it seems like it's now intended to have a 0-based index, yet the log message is still there and there is a check for > 0.

Yet by allowing index <= getWidgetCount(), it can also have an IndexOutOfBoundsException when the index == count (the issue we're running into).

It's fixable by either changing the index <= getWidgetCount() to index < getWidgetCount() and changing the index > 0 to index >= 0 or by reverting to a 1-based index.

Feel free to clarify, and I will update the pull request accordingly 😊

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.

1 participant