WoW:API SetCurrentGuildBankTab: Difference between revisions
Jump to navigation
Jump to search
(Created page with "This API appears to be broken in the current patch as of 11/1/2011 It DOES NOT really change the current guild bank tab! However, if you call GetCurrentGuildBankTab(), it will ...") |
No edit summary |
||
Line 1: | Line 1: | ||
This API appears to be broken in the current patch as of 11/1/2011 | {{Wowapi}} | ||
This API appears to be broken in the current patch ([[Patch 4.2.2]]) as of 11/1/2011. | |||
It DOES NOT really change the current guild bank tab! However, if you call GetCurrentGuildBankTab(), it will return the last digit given to this function. | It DOES NOT really change the current guild bank tab! However, if you call GetCurrentGuildBankTab(), it will return the last digit given to this function. |
Revision as of 17:34, 1 November 2011
← WoW API < SetCurrentGuildBankTab
This API appears to be broken in the current patch (Patch 4.2.2) as of 11/1/2011.
It DOES NOT really change the current guild bank tab! However, if you call GetCurrentGuildBankTab(), it will return the last digit given to this function.
perhaps a better approach would be to click the tabs directly:
local SetCurrentGuildBankTab do local clickFunctions = { function() GuildBankTab1Button:Click() end, function() GuildBankTab2Button:Click() end, function() GuildBankTab3Button:Click() end, function() GuildBankTab4Button:Click() end, function() GuildBankTab5Button:Click() end, function() GuildBankTab6Button:Click() end } SetCurrentGuildBankTab = function(tab) local func = clickFunctions[tab] if func then return func() else return error(string.format("Tab %s cannot be clicked!", tab)) end end end