Skip to content
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

ERROR: playdate.ui.gridview sections must contain at least one row when removing last Noble.Menu item #89

Open
optimusdag opened this issue Aug 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@optimusdag
Copy link

optimusdag commented Aug 25, 2024

Describe the bug
When you remove the last remaining element of a Noble.Menu the console shows
"ERROR: playdate.ui.gridview sections must contain at least one row."

To reproduce
Create a Noble.Menu add n number of menu items, then remove n menu items

Expected behavior
The last item is removed and no error is shown in the console output

Screenshots/Code snippets
This is the method that shows the error at the last item

function scene:clearMenu()
local totalMenuItems = #self.menu.itemNames
self.menu:deactivate()
for _ = 1, totalMenuItems do
self.menu:removeItem()
end
end

Additional context
I do a lot of menu building and rebuilding. So I add items and then remove all of them to rebuild the menu. This leads to a lot of console output. This is not a mayor issue since the app does not crash, but it's a bug anyways.

@optimusdag optimusdag added the bug Something isn't working label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To-do
Development

No branches or pull requests

1 participant