|
Fri, Jul 3 2009 8:00 PM
|
|
|
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
|
|
|
Locked
|
|
Sat, Jul 4 2009 1:12 PM
|
|
|
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)
|
|
|
Locked
|
|
Sat, Jul 4 2009 5:21 PM
|
|
|
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]
|
|
|
Locked
|
|
Sat, Jul 4 2009 5:53 PM
|
|
|
Do a Code: DEFAULT_CHAT_FRAME:AddMessage(myScanTip:NumLines())
DEFAULT_CHAT_FRAME:AddMessage(tooltip:NumLines()) and compare the results.
|
|
|
Locked
|
|
Sat, Jul 4 2009 8:43 PM
|
|
|
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]
|
|
|
Locked
|
|
Sat, Jul 4 2009 8:49 PM
|
|
|
I actually have found out a pattern. The bug only happens if the item tooltip has more than 8 lines.
|
|
|
Locked
|
|
Sun, Jul 5 2009 1:18 PM
|
|
|
Code: ooltip = MyScanningTooltip myScanTip = "MyScanningTooltip" ...does not equal the same thing. What was the result of the output that I suggested?
|
|
|
Locked
|
|
Sun, Jul 5 2009 3:17 PM
|
|
|
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.
|
|
|
Locked
|
|
Sun, Jul 5 2009 5:29 PM
|
|
|
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.
|
|
|
Locked
|
|
Sun, Jul 5 2009 7:01 PM
|
|
|
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]
|
|
|
Locked
|
|
Mon, Jul 6 2009 12:49 PM
|
|
|
The weird thing is, that I don't see how Auctionator interferes with a hidden tooltip anyway...
|
|
|
Locked
|
|
Thu, Jul 9 2009 8:11 AM
|
|
|
Noone else has any idea or suggestion for me...?
|
|
|
Locked
|
|
Thu, Jul 9 2009 10:13 AM
|
|
|
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.
|
|
|
Locked
|
|
Thu, Jul 9 2009 12:21 PM
|
|
|
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]
|
|
|
Locked
|