Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WildStar
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WildStar:UI Lua
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Tables === These table functions are shorthand references to the Lua table library (which is available via "table.", see [//lua-users.org/wiki/TableLibraryTutorial TableLibraryTutorial] for more info). Be aware that some table functions only work with tables with proper numerical indexes, where {[1] = "x", [3] = "y"} would have only one indexed value at 1. Not being aware of this fact is one major causes for bugs in code written in Lua. :{{\|id|API|ipairs}}(table) - gets an iterator of type integer to traverse a table :{{\|id|API|pairs}}(table) - gets an iterator to traverse a table ==== {{\|id|API|table}} ==== :{{\|id|API|table|concat}}(table [, sep [, i [, j]]]) returns (string) - build a string from table elements :{{\|id|API|table|foreach}}(table, function) - runs function for each name-value in table. (deprecated, use pairs) :{{\|id|API|table|foreachi}}(table, function) - runs function for each index in table, in order. (deprecated, use ipairs) :{{\|id|API|table|getn}}(table) returns (number) - gets cached size of table ''array'' values. (deprecated, use #table operator) :{{\|id|API|table|insert}}(table[, pos], value) - insert value into table at pos. default is end of table :{{\|id|API|table|maxn}}(table) returns (number) - last positive numerical index. requires scan of whole table :{{\|id|API|table|remove}}(table[, pos]) returns (any) - remove and return element at pos. default is last entry in table :{{\|id|API|table|setn}}(table, number) - attempts to set cached table size value. (deprecated, like getn) :{{\|id|API|table|sort}}(table[, comp]) - sort the elements in the table in-place, optionally using a custom comparator.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)