Mercurial > wow > ouroloot
diff gui.lua @ 81:0f6355bcfe68
Initial version of reassign_loot that handles remote broadcasting, tested in sandbox. Catch tab generation errors at a higher level and take apart the window (including STs) rather than propagating Lua errors upwards.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 15 Jun 2012 20:04:05 +0000 |
parents | 0235a1695b83 |
children | 940e53dd18c3 |
line wrap: on
line diff
--- a/gui.lua Thu Jun 14 04:48:13 2012 +0000 +++ b/gui.lua Fri Jun 15 20:04:05 2012 +0000 @@ -841,6 +841,9 @@ _d:SetUserData("player filter name", g_loot[rowi].person) st:SetFilter(_d:GetUserData("player filter by name")) _d:GetUserData("eoi_filter_reset"):SetDisabled(false) + -- it'd be more futureproof to get the button and call some kind + -- of :GetText() on it, but no such function is provided by acegui + setstatus[[Use the "Reset Player Filter" button in the lower-right to return to normal.]] end, ["Change from 'wipe' to 'kill'"] = function(rowi) @@ -854,7 +857,7 @@ end, df_REASSIGN = function(rowi,to_whom) - addon:reassign_loot (rowi, to_whom) + addon:reassign_loot ("local", rowi, to_whom) CloseDropDownMenus() -- also need to close parent menu end, ["Enter name..."] = function(rowi) @@ -974,7 +977,7 @@ tt:ClearLines() tt:AddLine("Missing Cache Data") tt:AddLine([[Wait a few seconds, then type]], 0.8, 0.8, 0.8, 1) - tt:AddLine([[/ouroloot fixcache]], 0, 1, 64/255, nil) + tt:AddLine([[/ouroloot fix cache]], 0, 1, 64/255, nil) tt:AddLine([[and redisplay this window.]], 0.8, 0.8, 0.8, 1) tt:Show() elseif e.itemlink then @@ -2290,7 +2293,10 @@ end tabs.titletext:SetFormattedText (fmt, addon.sender_list.activeI) end - return tabs_OnGroupSelected[group](tabs,spec,group) + local status,err = pcall (tabs_OnGroupSelected[group], tabs, spec, group) + if not status then + addon:horrible_horrible_error(err) + end --[====[ Unfortunately, :GetHeight() called on anything useful out of a TabGroup returns the static default size (about 50 pixels) until the refresh @@ -2920,7 +2926,7 @@ end,]] OnAccept = function(dialog, data) local name = dialog.usertext --editBox:GetText() - addon:reassign_loot (data.index, name) + addon:reassign_loot ("local", data.index, name) data.display:GetUserData("eoiST"):OuroLoot_Refresh(data.index) end, }