UIItem Events

Nov 27, 2008 at 9:53 AM
I was just wondering if there is a way to fire some code when a button is clicked say. I know I can make a method which clicks the button then runs my code but this then duplicates a click action which if someone else doesn't know to use it and uses the normal click action, my code will get missed.

I had a look at your button UIItem and it seems to trigger events when things are clicked and actions are performed on them. How can I link my code to fire when these events occur?
Coordinator
Dec 5, 2008 at 2:56 PM
this is not a supported feature of white yet but you can call HookEvents method to hook you own listener
Dec 5, 2008 at 3:32 PM
Could you give some example code of how I can hook into and listen to a button being pressed? I don't fully understand how your HookEvent method is meant to work.

From what I got from it, for every button I need to listen to an event from I need to pass the event listener into the button object using HookEvent?
Coordinator
Dec 8, 2008 at 4:31 PM
yes thats right.......since what you are looking for is part of recorder, you should have a look at the source code for it
May 13, 2015 at 5:56 PM
Edited May 13, 2015 at 5:56 PM
Hello Viveksingh,

I am trying to implement the HookEvent, but I did not get to do that. Could you send me an example ?

Thanks ,
Eduardo
May 15, 2015 at 8:51 AM
Hey Eduardo,

Vivek has stopped working on white and some other guys now supports the development of the framework.

Have a look at http://www.teststack.net/

Kind Regards
Throndorin