Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-20-13, 01:24 PM   #37
Sharparam
A Flamescale Wyrmkin
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 102
Originally Posted by Nibelheim View Post
Woops. Forgot a part. First file should be:
Lua Code:
  1. local addon, ns = ...
  2. ns[1] = {}
  3. ns[2] = {}
  4.  
  5. local Funs, Settings = unpack(select(2, ...))
  6.  
  7. Settings.defaults = {
  8.    x = 0,
  9.    y = 0,
  10. }
  11.  
  12. Funs.updateSettings = function()
  13.     -- do stuff
  14. end
Why use "select(2, ...)" as argument to unpack when you can just pass in ns instead (which should be better performance-wise)?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » H: Why XML and why LUA?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off