View Single Post
Old 10-13-2016, 09:41 AM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by DarkStar View Post
^^^^
Ah, I didn't know about 2-dimensional dynamic arrays. That could do it.

But. how about the case where they are not tracks and clips but elements where I cannot determine how many there are in each chain?
It would work the same I suppose...Nested tables. (Lua doesn't even have arrays, 1D/2D/otherwise, all data that needs to be in "collections" must be put into tables.)

Unless there was a really good reason to, I wouldn't play around with stuff like trying to use integer indexes in some convoluted fashion. The Lua tables can have for example strings as the table keys, which could probably be used more easily. Can you explain your intended data access pattern in more detail?
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote