Thread Tools Display Modes
08-07-05, 03:12 PM   #1
rte
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Aug 2005
Posts: 6
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.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » problem with TooltipTextLeft1 on bank items

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off