WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   UI Error - (Compact Raid Frame) (https://www.wowinterface.com/forums/showthread.php?t=45034)

VincentSDSH 03-25-13 04:11 PM

Quote:

Originally Posted by Leatrix (Post 275119)
The end result is that only the 'okay' button is shown in the panel and ciicking the button, or pressing the escape key, performs the 'okay' click action, thus taint never occurs even during combat. I personally don't feel that the loss of the cancel ability amounts to anything since hardly any other part of the UI (and very few addons) feature a cancel button. I'm sure users would prefer a taint-free addon anyway.

And for addons, I'd tend to agree with you; however, doesn't that mean you can't cancel changes you make in the client's interface options?

Foxlit 03-25-13 05:14 PM

Quote:

Originally Posted by Leatrix (Post 275187)
It most certainly does. However, as I said in my previous reply, I don't think that's important.

Please don't break functionality in other addons just because you don't think that functionality is important. Some configuration panels are more than just a list of checkboxes, and undoing all actions is not always as simple as repeating what you did in reverse.

You could instead call the cancel handlers on other addons' configuration panels before you convert the cancel action into an okay one. Alternatively, replace the cancel handlers on just the Blizzard panels that are causing issues with null functions.

Foxlit 03-25-13 06:59 PM

Quote:

Originally Posted by Leatrix (Post 275190)
The problem here is that the cancel function is used for all addons and options collectively and it has caused UI taint for years for this reason. The taint occurs if you have any addon installed which uses the Blizzard interface options panel regardless of what that addon actually does (it needn't do anything).

I think you misunderstood: the suggestion was that you should replace panel.cancel functions on Blizzard panels that actually need to be called securely (or they'll propagate taint to places that can't tolerate it) with functions that do not do anything. In practice, this is as simple as doing
Code:

CompactUnitFrameProfiles.cancel = function() end
after Blizzard_CUFProfiles loads; if you identify other problematic panels, you can do the same for those. The point here is that InterfaceOptionsFrameCancel_OnClick does not taint anything important by itself -- it's the individual cancel handlers that might cause problems.

VincentSDSH 03-25-13 07:42 PM

Makes me wonder if a stand-alone mod, implementing both approaches on user choice, might be in order; though, with the pittance of threads I found on this problem, it may not be as impacting as I thought.

My hat's off to both of you, though. I disagree with Leatrix on the Cancel-button issue but I implemented it in my baseplate UI (sans-cancel->no-errors > blocking errors) and what a bloody difference. Not a single random "var comparator was nil" type error since I put it in, vs 3-5 per raid -- I had an odd moment of wondering if I'd broken Buggrabber since it didn't complain about anything for hours. Have to give Foxlit's approach a try -- feels a bit cleaner, and less chance of unintended effects -- but after having 4 headaches evaporate instantly, it might be worth a cancel button :)

Edit: er, maybe I'll have to take that back. Instances and Scenarios both were chucking up issues this evening. Cancel was missing but the errors weren't. Odd.

Phanx 03-25-13 09:01 PM

I'm with Leatrix on this one... the Cancel button does nothing for the majority of addons, and doesn't even do very much for the Blizzard panels it does apply to. Plus, it's really annoying to change a Blizzard option and then have it reverted because you hit Esc to close the window instead of clicking the Okay button. In the event you did accidentally click "Show action bar 4" and then change your mind, you can just click it again to go back to how it was. Users in WoW are used to options applying immediately when changed.

I added the button-removal code to my own UI and don't miss the button at all, or the tons of CRF-related taint errors in BugSack.

Phanx 03-25-13 11:31 PM

I do have a "Reset" button in one of my addons, because users can't be expected to know the RGB values for the default class colors. Other than that, if they don't like the statusbar texture they picked, they can just pick a different one.


All times are GMT -6. The time now is 10:33 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI