• 1 page(s)
Insane tooltip bug with RhadaTip and Auctionator

Hello everyone. After having spent quite a lot of time trying to figure it out by myself, I'm helpless and have to come to you in order to understand what is going on.

I'm trying to figure out a compatibility issue between my mod RhadaTip and Actionator. I'll post you 2 images:

This first one is obtained with RhadaTip and Auctionator both turned on


This one is obtained turning off Auctionator instead.


As you can see, if I turn Auctionator on, it still says that there are 9 lines in the tooltip, but it doesn't print the last one, since it's nil (here is the code)...

Code:

for i=1,tooltip:NumLines() do
    if getglobal(myScanTip .. "TextLeft" .. i) ~= nil then
        mytext = getglobal(myScanTip .. "TextLeft" .. i)
    else
        break            
    end
    local text = mytext:GetText()
This only happens on few selected items that have apparently no relation with eachother.
It has nothing to do with the line itself, as for example a similar "critical strike rating" line is parsed without problems on the boots.

I'm so lost, does anyone have any idea?

Thanks a lot,
Rhad

Report this thread post Locked

Well, just looking at what you provided the only issue that might crop up a possible discrepency between tooltip:NumLines() and how may lines your myScanTip object have. Just to debug try changing the tooltip:NumLines() to myScanTip:NumLines() or mytext = getglobal(myScanTip .. "TextLeft" .. i) to mytext = getglobal(tooltip.. "TextLeft" .. i)

 

See my "Thread to end all threads thread" for the answer to your question!

Report this thread post Locked

I will in a couple of hours, but how do you explain it? I mean, even if they are referring to two different tooltips, how can it be that the tooltip is of the right item, but lacks one row? IE: even if the 9 lines are of another tooltip, and the tooltip really only has 8 lines, how can there be a missing 9th line from the tooltip of those leggings?

It would have made sense the other way around, if numLines returned 8 because it was pointing to a wrong tooltip, so the scanning only actually scanned the first 8 lines of the 9 total lines, but not this way around imo.

 

Btw, I tried RightText without luck...


[edited by: tylerdurden2 at 5:23 PM (GMT -6) on 4 Jul 2009]

Report this thread post Locked

Do a

Code:
DEFAULT_CHAT_FRAME:AddMessage(myScanTip:NumLines())

DEFAULT_CHAT_FRAME:AddMessage(tooltip:NumLines())

and compare the results.

See my "Thread to end all threads thread" for the answer to your question!

Report this thread post Locked

Wait, the code before it is:

Code:

local tooltip
local myScanTip
if MyScanningTooltip:GetItem() ~= nil then
        tooltip = MyScanningTooltip
        myScanTip = "MyScanningTooltip"
else
        tooltip = MyScanningTooltip2
        myScanTip = "MyScanningTooltip2"
end

so tooltip is the actual tooltip, myScanTip is just a string.

 


[edited by: tylerdurden2 at 8:43 PM (GMT -6) on 4 Jul 2009]

Report this thread post Locked

I actually have found out a pattern. The bug only happens if the item tooltip has more than 8 lines.

Report this thread post Locked
Code:
ooltip = MyScanningTooltip
myScanTip = "MyScanningTooltip"
...does not equal the same thing. What was the result of the output that I suggested?

See my "Thread to end all threads thread" for the answer to your question!

Report this thread post Locked

Can't do that, gives me an error:

Code:

DEFAULT_CHAT_FRAME:AddMessage(myScanTip:NumLines())

DEFAULT_CHAT_FRAME:AddMessage(tooltip:NumLines())

 

The first is a string, not a tooltip, can't call NumLines() on it.

Report this thread post Locked

Well, I guess that my whole point is that you are using toolTip to contol your loop but you are using myScanTip for the actual text output. So, it seems to me that the toolTip object contains more lines than the myScanTip actually has. So you have to do some debugging and figure out what each object actually has and how they differ. Do you actually need two different tooltip objects? I'm not 100% on what you are trying to do here anyways.

See my "Thread to end all threads thread" for the answer to your question!

Report this thread post Locked
Code:

local function getDPS()
local tooltip
local myScanTip
if MyScanningTooltip:GetItem() ~= nil then
        tooltip = MyScanningTooltip
        myScanTip = "MyScanningTooltip"
else
        tooltip = MyScanningTooltip2
        myScanTip = "MyScanningTooltip2"
end
...
for i=1,tooltip:NumLines() do
    if getglobal(myScanTip .. "TextLeft" .. i) ~= nil then
        mytext = getglobal(myScanTip .. "TextLeft" .. i)
    else
        break            
    end
    local text = mytext:GetText()


Basically, sometimes I'm calling this function to analyze an item tooltip that I've set (using setHyperLink) to MyScanTooltip, some other times I'm calling this function after having done the same but on MyScanTooltip2.

Imagine that sometimes I do:

MyScanTooltip:setHyperLink(itemLink)
local dps = getDPS()

other times I do

MyScanTooltip2:setHyperLink(itemLink)
local dps = getDPS()

tooltip in getDPS() is an actual tooltip object, either MyScanTooltip or MyScanTooltip2, myScanTip is just a comodity string. Without it I'd have had to do:

Code:

local function getDPS()
local tooltip
local myScanTip
if MyScanningTooltip:GetItem() ~= nil then
        tooltip = MyScanningTooltip
else
        tooltip = MyScanningTooltip2
end
...
for i=1,tooltip:NumLines() do
    if getglobal("MyScanningTooltipTextLeft" .. i) ~= nil then
        mytext = getglobal("MyScanningTooltipTextLeft" .. i)
    elseif getglobal("MyScanningTooltip2TextLeft" .. i) ~= nil then
        mytext = getglobal("MyScanningTooltip2TextLeft" .. i)
else
        break            
    end
    local text = mytext:GetText()



By the way, keep in mind that the issue only present itself if I load Auctionator.


[edited by: tylerdurden2 at 7:02 PM (GMT -6) on 5 Jul 2009]

Report this thread post Locked

The weird thing is, that I don't see how Auctionator interferes with a hidden tooltip anyway...

Report this thread post Locked

Noone else has any idea or suggestion for me...?

Report this thread post Locked

You erally need to do some major outputting of your variables in all different spots and no one else can do it for you. You will never get a "Oh yea, that same thing happened to me" with such a unique question like this. Once you have an idea of where your problem lies then post back here with some updated information.

See my "Thread to end all threads thread" for the answer to your question!

Report this thread post Locked

Oh man I'm THAT dumb...

I only checked his XML for a frame naming conflict, he builds this frame in one of the lua.

The issue was just that, so I guess that the thread can be closed now.

 


[edited by: tylerdurden2 at 12:30 PM (GMT -6) on 9 Jul 2009]

Report this thread post Locked
  • 1 page(s)
Subscribe to this thread: (you will receive emails when new posts are made)