I'm trying to make an LDB plug-in and the spawning of the GameTooltip is giving me some trouble. I have successfully managed to create the module and have placed it in the broker. It is responding to events such as OnClick and OnEnter, but I can't manage to create a GameTooltip in OnEnter.
This is what I have so far:
BKT = LibStub("AceAddon-3.0"):NewAddon("BKT", "AceTimer-3.0", "AceEvent-3.0", "AceConsole-3.0")
local ldb = LibStub:GetLibrary("LibDataBroker-1.1")
Broker_BKT = ldb:NewDataObject("BKT", {
type = "data source",
text = "BKT",
OnEnter = function()
BKT:displayKills()
end })
function BKT:displayKills()
print("Displaying Kill") --this appears, so I know the function is being called
local parent = Broker_BKT:GetParent()
--the problem appears to be here, as the error is always saying the parent is incorrect
GameTooltip:Hide()
GameTooltip:SetOwner(parent, "ANCHOR_RIGHT")
GameTooltip:ClearLines()
GameTooltip:AddLine("Test");
GameTooltip:Show()
end
My apologies if this is a basic question but I've had a look around and the only way I can get it to work is by setting parent either to UIParent or to RightChatDataPanel which only work in very specific circumstances (I use ElvUI). So how can I go about getting the frame of the broker to anchor my tooltip too?
I've been reading through various threads to attempt to get my options to work, and I believe I've correctly added both the profiles and options pane to the blizz options successfully, but whenever I open this frame using the chat command I get an assertion failure, but I can't figure out what I'm doing wrong. The assertion failure says that there's a problem on line 60 in my config file, but I can't figure out what it is.
These are my two files, hopefully it's not something incredibly stupid.
First off, AG_UF is a great addon, I've been using it for a while and I love it, recently I encountered two bugs and I looked through the forums a bit but couldn't find it, so here goes.
Sometimes after dying in a raid or party when my UI reloads, I either have AG reload perfectly normally, or one of these two:
1) My "self" frame will still read "dead" even when I have gotten to my corpse and ressed. When I target myself the "target" frame is fine, just the "self' frame remains "dead" until i reload my UI.
2) Everything will reload perfectly, except at the top of my screen I can see another player in my party, displayed in the default Blizzard UI. Not only does it show up in the default UI, but the information in this frame conflicts with the frame that AG_UF is displaying making it very annoying. I've noticed it tends to be the person who I had targeted when I hit release and it reloaded the UI, though this is not always the case. The only way to fix this is to reload the UI.
Any help would be appreciated, and if this has been brought up already I apologize.
0
0
This is what I have so far:
My apologies if this is a basic question but I've had a look around and the only way I can get it to work is by setting parent either to UIParent or to RightChatDataPanel which only work in very specific circumstances (I use ElvUI). So how can I go about getting the frame of the broker to anchor my tooltip too?
Thanks
0
0
local _fontName, _fontSize = "Interface\AddOns\ElvUI\media\fonts\Action_Man.ttf",13
But no luck. Any ideas?
0
0
These are my two files, hopefully it's not something incredibly stupid.
Core
http://www.wowace.com/paste/4522/
Config
http://www.wowace.com/paste/4523/
Thanks for the help.
0
Sometimes after dying in a raid or party when my UI reloads, I either have AG reload perfectly normally, or one of these two:
1) My "self" frame will still read "dead" even when I have gotten to my corpse and ressed. When I target myself the "target" frame is fine, just the "self' frame remains "dead" until i reload my UI.
2) Everything will reload perfectly, except at the top of my screen I can see another player in my party, displayed in the default Blizzard UI. Not only does it show up in the default UI, but the information in this frame conflicts with the frame that AG_UF is displaying making it very annoying. I've noticed it tends to be the person who I had targeted when I hit release and it reloaded the UI, though this is not always the case. The only way to fix this is to reload the UI.
Any help would be appreciated, and if this has been brought up already I apologize.