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.
remove_tab
-
- Burner Inserter
- Posts: 18
- Joined: Sat Aug 19, 2017 6:06 pm
- Contact:
Re: remove_tab
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.
-
- Burner Inserter
- Posts: 18
- Joined: Sat Aug 19, 2017 6:06 pm
- Contact:
Re: remove_tab
thanks a lot, i wasnt aware that there is a difference to begin with between leaving it out and providing nil instead.
Re: remove_tab
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.
Re: remove_tab
And in 2.0 it will be possible to simply call remove_tab() without the extra nil param.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.