Livecode Flushevents Problem

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
level7lab
Posts: 1
Joined: Wed May 07, 2014 6:04 am

Livecode Flushevents Problem

Post by level7lab » Wed May 07, 2014 6:11 am

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?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Livecode Flushevents Problem

Post by Simon » Wed May 07, 2014 6:37 am

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 14190
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Livecode Flushevents Problem

Post by Klaus » Wed May 07, 2014 11:41 am

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

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Livecode Flushevents Problem

Post by [-hh] » Wed May 07, 2014 3:43 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 2:56 pm, edited 1 time in total.
shiftLock happens

Klaus
Posts: 14190
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Livecode Flushevents Problem

Post by Klaus » Wed May 07, 2014 4:00 pm

I did not say "always"! 8)

Post Reply