"trapping" a hilited line change on mouse click
Posted: Tue Mar 17, 2009 11:18 am
Hi all,
I'm new to RR and would appreciate some help.
I have a list in a text field. When the user clicks on a line in the list, I want to action some code BEFORE the line just clicked on is hilited. ie. the flow/experience I want is:
- the currently hilited line is LineX
- user clicks on LineY
- some code is executed (LineX is still hilited)
- LineY is then hilited (or not)
I thought that this would be via mouseDown - and that I would need to pass the mouseDown message for the hilited line to change. Here's the example I have being trying to get this working:
However, I get the following when I test this:
- the currently hilited line is LineX
- user clicks on LineY (and does not release the mouse, so it's still down)
- LineY is hilited
- code is executed (ie "Hello")
Perhaps mouseDown is not the correct message to handle? I thought that I would have had to pass the mouseDown message for the hilted line to change?
Thanks,
Vicktor.
I'm new to RR and would appreciate some help.
I have a list in a text field. When the user clicks on a line in the list, I want to action some code BEFORE the line just clicked on is hilited. ie. the flow/experience I want is:
- the currently hilited line is LineX
- user clicks on LineY
- some code is executed (LineX is still hilited)
- LineY is then hilited (or not)
I thought that this would be via mouseDown - and that I would need to pass the mouseDown message for the hilited line to change. Here's the example I have being trying to get this working:
Code: Select all
on mouseDown
answer "Hello" -- or some other code here
end mouseDown
- the currently hilited line is LineX
- user clicks on LineY (and does not release the mouse, so it's still down)
- LineY is hilited
- code is executed (ie "Hello")
Perhaps mouseDown is not the correct message to handle? I thought that I would have had to pass the mouseDown message for the hilted line to change?
Thanks,
Vicktor.