Recursive Handlers/Functions

wouter wouter.abraham at pi.be
Thu Sep 4 08:19:01 EDT 2003


Hi,

Just to illustrate the point about recursive "handlers/functions" 
without being bothered by "directories" no more, run the following test 
if you want to, please?
2 buttons and 1 field in a new stack and paste the following scripts 
into each of the buttons:

button 1

Local lCount
on mouseUp
   put 1 into lCount
   doTheRecursiveDance
end mouseUp

on doTheRecursiveDance
   add 1 to lCount
   put lCount
   if lCount < 10000 then send "doTheRecursiveDance" to me
end doTheRecursiveDance


button 2

Local lCount
on mouseUp
   put 1 into lCount
   doTheRecursiveDance
end mouseUp

on doTheRecursiveDance
   add 1 to lCount
   put lCount
   if lCount < 10000 then send "doTheRecursiveDance" to me in 0.0001 
millisecs
end doTheRecursiveDance


While running the handlers try typing in the field
and observe what happens.

I rest my case and will have some recursive drinks,
Greetings,
WA




More information about the use-livecode mailing list