Skip to content

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

@optimusdag

Description

@optimusdag

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    To-do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions