comparison gui.lua @ 9:4fba9c6b5d3d

Sanity check on history realm list dropdown.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 17 Jun 2011 20:30:46 +0000
parents 30ba1f35e164
children 67b8537e8432
comparison
equal deleted inserted replaced
8:30ba1f35e164 9:4fba9c6b5d3d
1147 1147
1148 local b 1148 local b
1149 do 1149 do
1150 local realms,current = {},1 1150 local realms,current = {},1
1151 for realmname,histtable in pairs(addon.history_all) do 1151 for realmname,histtable in pairs(addon.history_all) do
1152 tinsert(realms,realmname) 1152 if type(histtable) == 'table' then
1153 if addon.history == histtable then current = #realms end 1153 tinsert(realms,realmname)
1154 if addon.history == histtable then current = #realms end
1155 end
1154 end 1156 end
1155 b = mkbutton("Dropdown", nil, "", [[Which realm to display]]) 1157 b = mkbutton("Dropdown", nil, "", [[Which realm to display]])
1156 b:SetFullWidth(true) 1158 b:SetFullWidth(true)
1157 b:SetLabel() -- required even when empty, see ace3 ticket #234 1159 b:SetLabel() -- required even when empty, see ace3 ticket #234
1158 b:SetList(realms) 1160 b:SetList(realms)