1. In the past I relied on States and virtual clicks to create 1 button and several Headers (and page long state transitions) to do whatever action/spell/macro related thing.



    With the release of WoTK I see too many new options but I am still a bit confused; I got too used to States to communicate my intentions to other parts of the code but after reading the documentation about the new environment I question my self from where should I start?.



    Qs:

    Lets say I have a button SpellCaster and button ChangeSpell; btn SpellCaster is sencitive to Stance changes and can cast SpellA, SpellB and SpellC depending on the Stance and a valuse set by ChangeSpell btn.



    Q1: Witch would be the best way to solve this using WoTK ways?.

    Q2: The newstate and attribute action button functionality is just complete death?.

    Q3: Is there any real power in using the States concept to solve this problem?.



    Thanks A Lot.

    In the past I relied on States and virtual clicks to create 1 button and several Headers (and page long state transitions) to do whatever action/spell/macro related thing.



    With the release of WoTK I see too many new options but I am still a bit confused; I got too used to States to communicate my intentions to other parts of the code but after reading the documentation about the new environment I question my self from where should I start?.



    Qs:

    Lets say I have a button SpellCaster and button ChangeSpell; btn SpellCaster is sencitive to Stance changes and can cast SpellA, SpellB and SpellC depending on the Stance and a valuse set by ChangeSpell btn.



    Q1: Witch would be the best way to solve this using WoTK ways?.

    Q2: The newstate and attribute action button functionality is just complete death?.

    Q3: Is there any real power in using the States concept to solve this problem?.



    Thanks A Lot.

    Sorry for the late reply. I assume this thread over on the wow forums is yours? If you have any further questions, don't hesitate to ask!

    :)

    "State" in 2.0 was a way to translate a set of circumstances (stances, target characteristics, combat situation, and user input) into a set of functional characteristics (spells cast when you press a particular button, action bars being visible, etc.).

    In 3.0, You use Lua logic to perform that translation. The "state" of the action bar in the above example is whether or not it's hidden or shown, rather than a number on a header. The spell cast by a particular button is reset when the desired circumstances change, rather than by remapping the user input based on an immediate evaluation of the circumstances.

    So basically, you want your spell casting button to receive certain inputs (such as a stance changing, or someone clicking on another button), and change its "spell" attribute in response to those changes. You can hardcode which spells follow each other, or you can use a global variable, private to the header, to record the point in the sequence controlled by the other button.