LibDBIcon ... how to hide ?
Hi everyone.
I have done a lot of addon using LDB (and recently I am trying to convert them to libqtip). Some friends of mine dont use a databroker display so I thought to use the minimap to attach these addons to an icon on it. I usually use a code like this: Lua Code:
and it works. But if I want to Hide/Show the icon with what I think I have to use, in this way: Lua Code:
It doesn't works. Probably I miss something, but reading the home page of LibDBIcon and some sample here and there I thought I have put everything I need (excepts for bunnies :) Thanks. |
The lib provides a function that takes the name.
ldbicon:Hide(objname) |
Code:
local addon = LibStub("AceAddon-3.0"):NewAddon("MyAddOn") |
Hi myrroddin,
thanks so much for your reply. At the moment I am using only a minimal set of libraries. Lua Code:
I don't think I can use your code. Most of it relies on ACE libraries I think, or am I wrong ?! Btw I have make it works thanks to your inputs. Lua Code:
And then I can call: Lua Code:
Obviusly it is a very simple solutions and it doesnt take care of saved positions and preferences, but I dont have the libs to do it I think ... or I am wrong ? Btw thanks so much for your help. It is so much appreciated. |
I'll write up something without Ace (not ACE, it isn't an acronym) later. Yes, you can use LibDBIcon-1.0 without Ace3 and you are doing it most of it already.
I do not think lines 3 and 6 sync. On line 3 ADDON is presumably a table while on line 6 you use ADDON as a string. Code:
local addonName, ADDON = ... -- returns string, table |
Hi myrroddin,
I always start my addons in this way: Lua Code:
And then I ever used ADDON as string everywhere :) I think it is a string, but I can be wrong. Do you think it can be a table ? Thanks so much for your help. |
ADDON (or whatever you call it) is always a string containing the name of the addon. You treat the ... passed to your .lua file as you would the ... passed to an OnEvent function ie. a variable number of parameters.
Blizzard may add a third or fourth ... parameter in future but as of today, it's just the two (first, a string containing the addon name (ADDON) and the second, a table that is unique to the addon (namespace)). |
All times are GMT -6. The time now is 03:15 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI