View Single Post
12-03-10, 05:30 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Every table is a list of keys and values. In a multidimensional table, it's a base table with additional tables as values to add depth. To get the keys in the second dimension in this case, you need to put in a nested loop iterating through the retrieved table.
lua Code:
  1. -- generic format
  2. CFM_Profiles[realm][toon] = {}
  3.  
  4. -- create dropbox values
  5. function CFM_LoadDropInit(self)
  6.     local level = level or 1
  7.     local info = UIDropDownMenu_CreateInfo()
  8.    
  9.     local i = 0
  10.     for realm, list in pairs(CFM_Profiles) do
  11.         for name, data in pairs(list) do
  12.             info.text = realm.. " - ".. name  --  line 1363
  13. --          Finish what you need to do
  14.         end
  15.     end
  16. end
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 12-03-10 at 05:32 AM.
  Reply With Quote