Page 1 of 1

remove_tab

Posted: Fri Apr 26, 2024 3:25 pm
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.

Re: remove_tab

Posted: Fri Apr 26, 2024 3:31 pm
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.

Re: remove_tab

Posted: Fri Apr 26, 2024 3:42 pm
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.

Re: remove_tab

Posted: Sat May 04, 2024 4:49 pm
by Bilka
Thank you for pointing this out, docs updated for the next doc release.

Re: remove_tab

Posted: Tue May 07, 2024 6:53 pm
by Bilka
And in 2.0 it will be possible to simply call remove_tab() without the extra nil param.