"Dumb question" time

Eric Chatonet eric.chatonet at sosmartsoftware.com
Tue Jul 26 12:04:54 EDT 2005


Hi JB,

Try this:
2 buttons.
In the first one:

on mouseUp
   repeat 10000
     put random(100)
   end repeat
   put "Done"
end mouseUp

In the second one:

on mouseUp
   beep
end mouseUp

You can't beep but only wait until the loop has run entirely (you see  
that in the message box :-)
Now add a line into the first script:

on mouseUp
   repeat 10000
     put random(100)
     wait 0 with messages -- this one
     end repeat
   put "Done"
end mouseUp

You can beep while running the loop.
So, unless you put a wait x (even 0) milliseconds with messages in a  
handler, you will not be able to do anything but wait it has run  
until its end.

Hope this helps.

Best Regards from Paris,

Eric Chatonet.

Le 26 juil. 05 à 18:01, jbv a écrit :

> Eric,
>
> Thanks for the reply, but right after sending my previous
> post, an idea crossed my mind : I think it has to do with
> the structure of the data to be sorted...
> it can be 10 to 500 lines with 40 items in each line, and
> each item can be the sorting key, but for certain lines, the
> item can be empty and I have the feeling that it's the cause
> of the inconstency in the sort result...
> I'll check that...
>
> But anyway, my original question remains valid : what happens
> in Rev when a new script is triggered, and a previous script is
> still running ?
>
> Thanks,
> JB
>
>
>> Hi JB,
>>
>> Don't think so unless your global is 20 MB :-)
>> Could you tell us more to understand what are your globals contents,
>> how do you handle them, sort them, etc. and, may be, give you some
>> clues?
>>
>> Le 26 juil. 05 à 17:43, jbv a écrit :
>>
>>
>>> OK guys, it's "dumb question" time...
>>>
>>> I have a few buttons; when clicking on one of them,
>>> users trigger complex sorts in globals.
>>> a sporadic bug occurs (quite rare and impossible to
>>> reproduce, so far) : the sort doesn't execute well
>>> and the content of 1 of the globals isn't consistent
>>> anymore...
>>> so my (dumb) question is : is it possible that the user
>>> clicks so fast on a few successive btns that each script
>>> doesn't have the time to run till the end ?
>>> This can happen on browsers, when you click very fast
>>> on successive links...
>>> I doubt that it's the case in Rev, but I thought it was worth
>>> asking...

----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list