Page 1 of 1

Livecode Flushevents Problem

Posted: Wed May 07, 2014 6:11 am
by level7lab
Hi there,

I'm having some problems using flushevents in one of my programs.

Participants have an option to click on one of two buttons to make a response (lets call them A and B). In order to stop repetitive clicking recording when the buttons are disabled I have put code:

put flushevents (mouseup) into trash

However, what is happening is, if someone repeatedly presses on say button A while it is disabled, and then presses button B, the program is recording as if button A has been pressed again. After this the program rectifies to normal working order. This problem only happens if one of the buttons is clicked repeatedly during the time a button is disabled.

I have no idea how to stop this from happening. Can anyone help?

Re: Livecode Flushevents Problem

Posted: Wed May 07, 2014 6:37 am
by Simon
Hi level7lab,
Welcome to the forum!

I just tested this in 2 buttons one field:

Code: Select all

on mouseUp
   put the short name of me into fld 1
   disable me
   send enableMe to me in 5 seconds
end mouseUp

on enableMe
   enable me
end enableMe
Not getting the same results as you are.

Simon

Re: Livecode Flushevents Problem

Posted: Wed May 07, 2014 11:41 am
by Klaus
Hi level7lab,

1. welcome to the forum! :D

2. talking about music etc. is OFF-TOPIC, your question is not (Hint, Hint! 8) ).
So I will move this thread to the correct forum.


Best

Klaus

Re: Livecode Flushevents Problem

Posted: Wed May 07, 2014 3:43 pm
by [-hh]
..........

Re: Livecode Flushevents Problem

Posted: Wed May 07, 2014 4:00 pm
by Klaus
I did not say "always"! 8)