btw, Phanx, on a scale from 0 to Cthulhu, how strange was my code? ;)
Pretty comparable to the code of other large addons from the Ace2 era. I think the initial conversion of Grid from Ace2 to Ace3 was about the same amount of work. The options tables are by far the most time-consuming part of it.
And done. I didn't do any stress testing but everything seems to be working fine.
Summary of changes:
Converted to Ace3.
Removed AceLocale. It's useless when you can achieve the same result with a simple metatable in ~100 bytes of code.
Replaced FuBarPlugin with LibDataBroker and LibDBIcon.
Replaced Tablet with LibQTip.
Removed Dewdrop. Configuration now takes place in a normal GUI window instead of horrible nested dropdowns.
Added LibDualSpec for automatic profile swapping on spec swaps.
Added localization support to several options that were missing them, many of which seemed to be using raw DB values like "TIMELEFT" and of course the infamous "TENCH" that always bothered me when I actually used EBB years ago. :P
Things that could be done in the future:
Open config window to the relevant section when right-clicking on a bar group? Since Dewdrop no longer exists and multi-level dropdown configuration is a nightmare we are thankfully no longer trapped in, there's not really anything to show in a pop-up menu.
Check if AceConsole is actually needed, and remove it if not. I saw a few ElkBuffBars:Print calls but they're all commented out, and if you need to uncomment them for debugging in the future, you can just replace them with print to auto-concatenate all the values, or do it yourself with string.join.
Consider alternatives for multiselect controls in the whitelist/blacklist sections, as they have the potential to get quite long and cause quite a lot of scrolling.
Apparently these forums have a pathetically small maximum attachment size, so I've created a ticket on the project page and attached the ZIP file there:
Okay, I went ahead and converted the existing codebase to Ace3 today. That also included replacing FuBarPlugin (lol) with LibDataBroker + LibDBIcon, and Tablet with LibQTip, and updating the options table to work with AceConfigGUI. Still need to do a bit more work on the options table to avoid having 4930274324 nested tree levels, and also do more testing than just logging in and seeing a clear BugSack, but I expect to have it all done later tonight, or tomorrow at the latest.
I suspect any beta problems were caused by all the rotting corpses of long-dead libraries, but after the above is all done I'll log onto the beta to check. :p
Unless you have a lot of direct AceOO usage, you could do a quick conversion of EBB2 to use Ace3 in under an hour, easy. Definitely better than adding hacks/updates to a dead library. Hell, I'll even do it if you want... I need more things to do at work that don't require a lot of in-game testing. :p
Limitations of Interactive Frames
- You cannot use filters
- You cannot use frame visibility options
- You cannot set icons or bars to disable right click in the frame
- Names are by default set to activated, and you can't turn that off
- You cannot sort the buffs
So... exactly what I already said. The "solution" SBF is using is really just choosing Option #2 from my last post. EBB is currently in the Option #1 category. There is no magic code that can be copied to enable EBB to keep its current filtering and sorting features *and* give you right-click buff cancelling. It isn't possible. Period.
Unless you're willing to spend some time and effort learning how addons and the WoW API work, there's not really anything I can think of to tell you that will be any clearer than what I've already said.
I know close to nothing about coding so forgive me if I come off ignorant, however Satrina buff frames can right click off buffs. Is it not possible to copy or mimic their code and apply it to EBB?
Generally speaking, no. I don't use SBF anymore, so I don't know what it's doing exactly, but there are two possibilities:
1. You can't click off buffs while in combat. This would mean it's using another form of the same workaround EBB is currently using.
2. You can click off buffs while in combat. This would mean it's using Blizzard's new secure aura template, which allows buff cancelling in combat. This would also mean, however, that it has lost all of its advanced filtering and sorting features.
There's no middle ground. Either an addon can use the secure templates and allow right-click buff cancelling in combat, or it can allow custom filtering and sorting. You can't have both.
It's not possible to right-click off buffs because that action now requires a hardware event and can only be called from secure code.
Macros fit both of those criteria: they must be activated with a hardware event (key press or mouse click) and are secure. You can even type "/cancelaura Some Buff" in the chat frame; the Enter key press counts as a hardware event, and the Blizzard code which handles the "/cancelaura" command is secure.
Right-clicking a buff bar/icon is activated by a hardware event (mouse click) but it is not possible for an addon to create a buff display that is both secure and supports custom filtering/sorting. There are a number of workarounds, like the one EBB uses, but they are all just that -- workarounds. None of them really qualify as "simple", and none of them can work in combat.
Unless Blizzard decides to expand their secure aura templates to support custom filtering (beyond simplistic and useless "cast by me" vs "not cast by me" etc) and sorting, you will never be able to right-click EBB to remove a buff while in combat.
I have been trying to rip out the old and dying/dead ace2 and EBB breaks with an reference to AceLocale-2.2
Well, that's an easy one: it says that the AceLocale-2.2 library was not loaded when your code ran. The errors that follow are all connected to that one; either add back AceLocale-2.2, or change the localization to use AceLocale-3.0 or a non-library localization technique, and all of the errors should go away.
This got me thinking of a possible workaround around for right-clicking the buff off. Right-clicking on a buff icon or bar could generate /cancelaura <buff name> in the chat edit box and all that is left to do for the user is to press enter.
I'll hack my local copy of EBB tonight and see if this is actually workable.
It's not. I already tried it. You still get a "protected action" error, and can't even press Enter to submit/clear/close the edit box. I considered various ways to work around this popping up a dialog that users could copy text from to paste into the chat edit box by hand, for instance but they all seemed too cumbersome to be worthwhile, especially in combat.
I just have a macro that lists buffs I commonly want to cancel in a hurry:
/cancelaura Divine Protection
/cancelaura Hand of Protection
/cancelaura Noggenfogger Elixir
You could easily add the DBW buffs, or anything else you find yourself wanting to get rid of often.
Unfortunately cancelling auras is now a protected action, and the secure templates Blizzard added are extremely limited with regard to custom sorting and filtering, so any addons that want to provide advanced sorting and filtering won't be able to cancel buffs on click.
Sadly, I use right-click to remove a buff all the time. ... for mounts alone it is very useful.
How do you summon your mounts? If you just put one on your bar, you can click it again to cancel it. If you use a macro, you can just add "/dismount" to the same macro. If you use an addon, it probably has a dismount feature. If all else fails, you could just make a "/dismount" macro and put it on an out-of-the-way action button. :p