problem with TooltipTextLeft1 on bank items
When I try to get the description of the item that is in the main window of the bank I get an empty string back (nill), code however works fine on items in the bags.
Heres the code:
-------------------------------
local bag_id;
local slot_id;
...
Item_Tooltip:ClearLines();
Item_Tooltip:SetBagItem(bag_id, slot_id);
local itemDesc = " ";
local i;
for i=1, Item_Tooltip:NumLines(),1 do
local command = getglobal("Item_TooltipTextLeft" .. i)
if (i == 1) then
itemDesc = command:GetText();
else
itemDesc = itemDesc .. " <n> " .. command:GetText();
end
BankScan_Debug("desc: " .. itemDesc);
end
function BankScan_Debug(message)
if (DebugMode == 1) then
message = "**Bank Scan | Debug**> " .. message;
if ( DEFAULT_CHAT_FRAME ) then
DEFAULT_CHAT_FRAME:AddMessage(message, 1.0, 0.0, 0.0);
end
end
end
------------------------
I think it may be related to Tooltip:SetBagItem(), but know of no way to test it.
Any ideas?
Thanks in advance.
|