remove_tab

Post Reply
spacedestructor
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Aug 19, 2017 6:06 pm
Contact:

remove_tab

Post by spacedestructor »

Recently i ran in to "remove_tab()" while working with Gui things and i discovered that the documentation says "The tab to remove. If not given, it removes all tabs.".
However if i do this then the game will error and tell me that the "tab" parameter in "remove_tab(tab)" is a required parameter.
it doesnt particularly patter much if it gains this ability or if i always have to iterate over all tabs and the text just changes.
but i want to use this opportunity to mention personally i would appriciate it much if there was an ability to remove all tabs in the given "tabbed pane" as this would greatly simply my code and remove many lines in functions which handle the mods Gui.

Bilka
Factorio Staff
Factorio Staff
Posts: 3155
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: remove_tab

Post by Bilka »

You have to call remove_tab(nil), with the explicit nil arg. The docs need an update to make that clearer and I'll see if it's possible to change this to allow remove_tab() for 2.0.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

spacedestructor
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Aug 19, 2017 6:06 pm
Contact:

Re: remove_tab

Post by spacedestructor »

Bilka wrote:
Fri Apr 26, 2024 3:31 pm
You have to call remove_tab(nil), with the explicit nil arg. The docs need an update to make that clearer and I'll see if it's possible to change this to allow remove_tab() for 2.0.
thanks a lot, i wasnt aware that there is a difference to begin with between leaving it out and providing nil instead.

Bilka
Factorio Staff
Factorio Staff
Posts: 3155
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: remove_tab

Post by Bilka »

Thank you for pointing this out, docs updated for the next doc release.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Resolved Requests”