View Single Post
01-30-10, 06:54 AM   #16
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I do know exactly what is happening now, so let me try to explain...

nUI hides Blizzard's action bars. Without getting deep into a geek discussion, while bars are hidden their "ON EVENT" and "ON UPDATE" functions don't run. That's just how the API works.

After nUI hides Blizzard's action bars, it takes their key bindings and rebinds them to nUI's action bars. I do it this way so that nUI does not change the default UI key bindings and so nUI does not require the user to "configure" it when nUI is installed. If you uninstall nUI, your default UI still works as well.

So... now Blizzard's action bars are hidden and nUI's action bars have the key bindings. Now you're in combat and you are shape shifting or going in and out of stealth... that requires the "ON EVENT" and "ON UPDATE" methods of the action bars to be functioning... put in the simplest terms, that's how the action bars know which ability to tie to which key binding.

At some point, something in the Blizzard UI is sayins "Hey... those are my key bindings" and taking them back, reassigning them to the Blizzard action bar. When this happens, the key binding labels vanish from the nUI action bars, that's the cue.

The cool thing is that nUI shares the assignment of actions with Blizzard's action bars. Also on purpose for the same reason, nUI does not change the player's Blizzard UI setup and does not require configuring. So, as long as your action bar doesn't change, your spells still work... but they're actually firing from the Blizzard action bar instead of the nUI action bar because of this Blizz bug.

That's fine as long as you don't change action bar pages after the Blizz bars steal the key bindings back from nUI. However, if you do change action bar pages because of a change in stealth, stance or form, then because the Blizzard bars are hidden, their ON EVENT and ON UPDATE are not running and they do not update which spell goes with which key binding even though nUI's action bars did change which spells are supposed to be used.

Now the nUI action bar is showing you the spells you expect to see, but because the actions are firing off the Blizzard action bars, the spell being cast by each key binding is the old spell.

Viola -- there's your problem.

The "fix" is to not have nUI reuse Blizzard's action bar settings and key bindings and that's not an acceptable fix to me as that would undermine the entire intent of nUI to not require the user to configure it and to not have to "fix" their user interface if they disable nUI.

So... what I am looking for is either (a) what triggers the Blizzard UI to steal back the key bindings and/or (b) how to detect when this has happened *without* breaking the bars further or further degrading performance.

So far I've not figured that out... that's what I'm working on though. I spent about 12 hours on it last weekend and will likely spend much of this weekend on it too.

PS: The reason the '/nui rl' fixes the problem is because it lets nUI have the key bindings back until the next time Blizzard decides to steal them again.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/

Last edited by spiel2001 : 01-30-10 at 06:56 AM.