View Single Post
01-06-19, 08:18 PM   #9
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
In your other thread, these would be equivalent:
Lua Code:
  1. local _, HiddenFrames = ...
  2. print(type(HiddenFrames))
  3. -- >>> "table"
  4.  
  5. local HiddenFrames = LibStub("AceAddon-3.0"):NewAddon("HiddenFrames")
  6. print(type(HiddenFrames))
  7. -- >>> "table"
Both HiddenFrames are tables, initially empty, which you populate with whatever you see fit: functions, variables, more tables. You don't want to duplicate yourself, so pick one of the two above, and don't use both.

This is way off topic but to elaborate further:
Lua Code:
  1. local folderName, HiddenFrames = ...
  2. print(folderName)
  3. -- >>> "HiddenFrames"
  4.  
  5. print(type(folderName))
  6. -- >>> "string"

... is a variable argument, or vararg for short. It contains a variable quantity of variables, in this case, a quantity of two: a string and a table.

Last edited by myrroddin : 01-06-19 at 08:21 PM. Reason: explaining vararg
  Reply With Quote