View Single Post
Old 11-29-2019, 09:23 AM   #616
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Try this:
Code:
optarray = table.pack("PRESETS...","Save","Delete",">Load", table.unpack(preset_list)),
table.unpack dumps the contents of a table out as multiple return values, and table.pack takes all of its arguments and puts them into a new table.

By unpacking a table in a function call, all of the table elements are passed as separate function arguments.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote