Originally Posted by d87
what i fail to understand is why would you do something like that to default action bars. they're already doing this... Because of damn taint probably
|
It is for overriding Blizzard's default paging with some custom paging. Example: A priest has offensive spells on page 1 and heals on page 2. Custom paging is implemented so that ALT changes page 1 to page 2 and page 2 to page 1. If the ALT key was down without those SetAttribute calls while on page 1, all of the priest's spells would now be the heals from page 2 but still show the icons for the offensive spells from page 1.
Now the reason why Blizzard's code doesn't need to do that is because it updates the button visually via OnEvent in response to registered events while SecureStateDriver updates during OnUpdate. Since OnEvent is processed before OnUpdate, any state change made will not be picked up so you must force the update manually via a SetAttribute call in the secure environment since the OnAttributeChanged script also triggers a visual update.