LibQTip tooltip hides when there is a script on line or cell
Hi all.
Being confined in home in Italy in this period (and I stayed in home also from november to january with a broken leg) :( I decided to rewrite some of my addons in a (better) way. I try to use LibQTip again where possible to expand the possibilities of them (I had tried in the past too :). The first experiment I have done is a little guild and friends ldb and it works: Now I'd like to implement the possibility to whisper and invite clicking on the row of the names but when I mouse over on the line the tooltip close. This is a small sample code that I have used: Lua Code:
The tooltip is shown until I dont over with the mouse on line: "var1","var2","var3","var4" and it works fine ... when I pass on that line it disappears. No need to click. The print inside is never called. If I remove the function I can on mouse over, no error but the tooltip remain. I check also a lot of others libqtip addons and I see they have the line colored when there is a script running on the cell or on the line even if I see no evidence in the code, while I was not able to reproduce it. I am missing something but even if I have read and search a lot I could not figure out the solution for the problem. Every input is welcome as usually. Thanks so much at everyone. |
Doing an OnEnter on the frame on top causes an OnLeave for the frame underneath it which would cause the closure of your information frame.
I don't know LibQTip or what else you might be using but you would need to implement a mouse check for the OnLeave to check if the mouse is still over the frame or not before closing eg. Code:
frame:SetScript("OnLeave" function(self) Take care and be safe. |
Hi Fizzlemizz,
If I enter the databroker the tooltip correctly appears. I can then move out the tooltip and it correctly disappears or I can move inside it and it correctly stay. But if I move on THIS line: Lua Code:
and only on this the tooltip wrongly disappears. The function never prints: "Never arrives here" so probably it doesnt get there. And as I wrote if I remove the function the tooltip doesn't disappears. I think what you say can be applied for me if I move out to the tooltip but I dont move out of it ... Or the "SetLineScript" add a more one different frame on the line ?!? Thanks for your help so much appreciated. P.s. Thanks also for your attention too :) |
Really just a stab in the dark but possibly you need something that stops the dataobj.OnLeave parent call doing it's default thing (presumably hiding the data frame)
Try doing this as a test which should print when you mouse over the line. Code:
dataobj.OnLeave = function(self) Hopefully someone knows these libraries better than I or if you know of a LDB addon that uses LibQTip the way you expect, you could look at how they did it. |
Hi,
Lua Code:
The only print() that triggers when I mouse over the line with scripts is: Lua Code:
Can you explain better what you mean by: The SetLineScript sets an OnEnter for the row highlight frame which posts an OnLeave to your data opbject. I didn't find any references of this highlight frame in the libqtip docs. And I really dont understand what I am doing wrong because all the others addons I am looking seems so similar to mine ... The only differences is that the others works as expected :) And it is really frustrating :)) Thanks so much for any help :)) |
You are setting an OnLeave script for the tooltip which is triggered by the OnEnter script within the tooltip. You want to set an OnRelease handler instead:
Code:
local ADDON = ... |
Hi Vrul,
thanks so much for your help, but with your code I am unable to enter in the tooltip. when I leave the databroker area to enter in the tooltip it disappears. Have I miss something ? Thanks. |
If you copied the code exactly I don't see why it wouldn't work as it works fine for me.
|
Hi Vrul,
you are right it works ... with your dockingstation :) I was testing with chocolatebar and it doesnt works there. I have also disable all addons and loaded only your code and chocolatebar and it doesnt works. Probably there is something that breaks with that launcher. Bah ... I have also delete the WTF but it doesn't works. I'd like if the code should be compatible with all launchers :/ or users will become crazy :) Thanks so much for your help Vrul :) |
Try getting rid of the code within the data broker OnLeave script. Maybe Chocolate bar doesn't pass the motion argument and that is the issue.
|
I think you got it !!!
I was testing all the other databroker and all had the same behaviour. Now I removed that part of code and almost everything works :)))) The last problem is the tooltip doesn't disappear ;) and last forever. Have I removed too much in the OnLeave ? BTW: thanks so much Vrul and everyone in this forum for patience and time. |
Quote:
Code:
OnLeave = function(self, motion) |
Thanks so much Vrul.
Now it seems everything is fine. Tomorrow morning I double check everything and let you know :) Now it's time to go in bed it's 3 AM here (eheheh :) Thanks again !!!! |
1 Attachment(s)
Hi all,
everything is working ... thanks so much to everyone. After all your help and suggestions I made a little addon to manage guild and friends. Not so much features, but for my needs it is more than enough. Here is the definitive screenshot. No ingame configs. The addon is in attach I'll publish it after my guild wake up an do a little bit more tests :) Thanks to everyone again. |
You can replace your header names with Blizzard global strings; that way they will be translated plus look correct with capitalization without you doing all the work.
Code:
-- old -- -- new -- |
Hi,
I did it infact in the version I published: Lua Code:
I have find some problems in the color by class because the C_BattleNet.GetFriendAccountInfo return the class name in the format not suitable for checking the raid colors (especially if you have a non english client). But I have found a snippet by phanx (which I miss so much really :) that works great to fix this. Lua Code:
In this way the GetClassToken(class) works always for class coloring the names and do the jobs always instead of my ugly solution I have found and that works only in english clients. Lua Code:
BTW: if you want to check it is here: https://www.wowinterface.com/downloa...ldFriends.html Any comments are welcome. Thanks so much for your time. |
All times are GMT -6. The time now is 03:56 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI