i have a step1() step2() in my application.In the UI the two buttons are visible,but only after first step1() is executed ,the step 2() willl be executed correctly.so i want that,if user click the second button alone,then it should not be activated,only after clicking the first button,the second should be activated.
if button2 has a clickevent you can remove it with
to put it back (i.e. in button 1 click event)
Set button2 visible or enable property to false, then in step1() set button2.visible or button2.enable to true.