View Single Post
02-01-12, 05:43 PM   #29
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
He means that when you call QueryGuildXP(), the results are not available immediately. Once your client has finished receiving the data from the server, and the data is ready to access, the GUILD_XP_UPDATE event fires. It's just like calling QueryQuestsCompleted() and then having to wait for QUEST_QUERY_COMPLETE to fire before you can call GetQuestsCompleted() to actually get the data.

Originally Posted by Grimsin View Post
a side note to phanx - so when i put this code into tables like you had suggested in the other post it causes some issues with the secure setattrib functions for the backpack button which is why i did not go the table route.
That does not make sense.

Code:
frame:SetAttribute("name1", "value1")
frame:SetAttribute("name2", "value2")
frame:SetAttribute("foo", "bar")
and

Code:
local attributes = {
    ["name1"] = "value1",
    ["name2"] = "value2",
    ["foo"] = "bar",
}
for k, v in pairs(attributes) do
    frame:SetAttribute(k, v)
end
are absolutely identical as far as the "security" of the code is concerned. If there was any problem, it's because some other code you added/changed/removed was doing something wrong. Without seeing your actual code, though, I can't tell you what you did wrong.
  Reply With Quote