[JW Lua] Iteration of Tables

Bruce Olson Finale at web.YOSound.com
Sun Nov 30 20:51:16 CET 2014


Hi Jan,

 

Yes, I had already looked at both those places. There are no useful
parameters to sort on, so sorting the table is not helpful. It is actually
already sorted. It’s that the pairs iterator doesn’t use that order for some
reason. And there is not another iteration scheme from the Lua docs that
seems to help.

 

-- 

Regards,

Bruce

 

From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jan Angermüller
Sent: Sunday, November 30, 2014 1:37 PM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Iteration of Tables

 

Hi Bruce,

I haven't read your code, but have you checked Jari's
explanation for sorting and parsing Lua tables:
http://jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:development#coll2table

You can also have a look at the Lua manual:
http://www.lua.org/pil/7.3.html

Maybe this helps ?

Best regards,
Jan

Am 30.11.2014 20:24, schrieb Finale at web.YOSound.com:

Hi Jari,

 

How do I iterate through a table so that the order does not change. In the
attached code using “for k, v in pairs()” I get a different order each time
it is run. If I use “for k, v in pairsbykeys()” it is always in the same
order, just not the order I want. ;) I’d like to get it in the order of the
table. Thanks for all your work and your prompt replies.

 

Best regards,

Bruce

 

-- 

Olson Sound Design, LLC

Bruce C. Olson

8717 Humboldt Avenue North

Brooklyn Park, MN  55444-1320

 

+1 (763) 493-5835 Office

+1 (763) 300-3893 Cell

 

Web Page:        http://www.OlsonSound.com

Business:         mailto:BCOlson at OlsonSound.com

Big Band:          http://www.BRBB.org

 






_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu






-- 
Jan Angermüller
Jevenstedter Str. 80
22547 Hamburg
Tel. 040 - 28 94 84 82
www.angermueller.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20141130/8a2a21b1/attachment.htm>


More information about the JWLua mailing list