Duplicate simultaneous calls to same handler

Phil Jimmieson phil at liverpool.ac.uk
Fri Jan 23 03:14:24 EST 2015


On 23 Jan 2015, at 04:42, Peter W A Wood <peterwawood at gmail.com> wrote:

> 
> I found out that you don’t even need two buttons. Hitting one button twice quickly will give the same effect.
> 


I see this problem with one of my large LiveCode projects, but particularly on Windows systems. Some users double-click everything and sometimes this invokes the button script twice - which leads to all kinds of problems. I've had to set a flag or disable the button as the first action (and if you do the latter it used to stop the debugger - it wouldn't debug the script of what had effectively become a disabled button…).


> Regards
> 
> Peter
> 
>> On 23 Jan 2015, at 11:26, J. Landman Gay <jacque at hyperactivesw.com> wrote:
>> 
>> Suppose I have a long handler that includes a few "wait with messages" so that users can continue interacting with the stack while it runs. The user does something that calls the long handler while it is still running from a previous instance. Assume there is no flag in the script to prevent that.
>> 
>> Does the engine queue the second call until the long handler finishes, and then send the message from the second call (serial responses)?
>> 
>> Or does the engine run two instances of the long handler simultaneously? If so, what happens to the values of the variables?
>> 
>> Or something else?
>> 
>> I've never allowed this to happen before but I find myself in a position where simultaneous calls would be the best way to handle things.
>> 
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Phil Jimmieson  phil at liverpool.ac.uk  (UK) 0151 795 4236
Computer Science Dept., Liverpool University, Ashton Building, Ashton Street
Liverpool L69 3BX              http://www.csc.liv.ac.uk/~phil/
I used to sit on a special medical board... ...but now I use this ointment.








More information about the use-livecode mailing list