Page 1 of 1

LuaGuiElement.select() uses a reserved keyword

Posted: Tue Nov 28, 2023 1:35 am
by Honktown
LuaGuiElement.select(start, end), in terms of Lua, creates an illegal identifier (end being a reserved keyword). Since it isn't actually constructed on the Lua side, this poses no issue at present in itself.

It's not that big of a deal, but for tools that may translate documentation into wrappers (e.g. the debugger), it requires a little tweaking to not break. Changing it subtly is enough to "fix" it. start_index + end_index, first + last, initial + final etc are just a few quick pairings that keep meaning but aren't illegal identifiers

Re: LuaGuiElement.select() uses a reserved keyword

Posted: Tue Nov 28, 2023 1:43 am
by Honktown
Example, borrowed from someone else:
caution.png
caution.png (12.2 KiB) Viewed 468 times

Re: LuaGuiElement.select() uses a reserved keyword

Posted: Mon Dec 11, 2023 3:49 pm
by Bilka
Thanks for noting this, the parameters have been renamed to start_index and end_index for the next version.