Good Evening Programmers ^^,
actually I'm trying to write an addon, something like Necrosis-Light, just using some Buttons. Obviously more work than I originally thought
and, of course, most time spend for debugging.
I have got a quite strange problem which really drives me crazy. I'm not able to cast spells or macros from the right button click. In order to make sure that the bug is nowhere else in my code (which ist getting more and more complicated) I tried some really easy code in order to see, whether the "bug"? happens there, too.
So...here is it:
local bb = CreateFrame("Button",nil, UIParent,"SecureActionButtonTemplate")
bb:SetHeight(BUTTON_SIZE)
bb:SetWidth(BUTTON_SIZE)
bb:SetPoint("CENTER", 0, 0)
bb:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }})
bb:SetAttribute("type1","spell")
bb:SetAttribute("spell1","Angreifen")
bb:SetAttribute("type2","spell")
bb:SetAttribute("spell2","Angreifen")
bb:Show()
The spell "Angreifen" ist the german translation of "Attack", cause I'm using the german client.
I know that it makes no sense to have the same spell on both mousebuttons, but that's not the point. I choosed identical Spells in order to avoid any typing-errors.
All further addons have been deactivated, cache deleted.
I Assume that there is a little creepy, f...ing line of code missing. But i have no clue what it could be. I studies several hours of wowwiki and other page and I would give my left hand that everything should be correct.
Any Ideas for me? I'm getting weird with this little problem...
Thanks a lot in advance with greetings from the dark side of azeroth,
Val aka Antrichst