WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   problem with TooltipTextLeft1 on bank items (https://www.wowinterface.com/forums/showthread.php?t=1453)

rte 08-07-05 03:12 PM

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.


All times are GMT -6. The time now is 02:12 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI