Help: script only works when in debug mode

Ian McKnight igmcknight at gmail.com
Sun Apr 9 03:40:44 EDT 2006


Hi

I placed the following handler in a 'parent' button (called Btn1 and 
Label set to 1) size 40 by 40.
The objective is to produce a row of 10 evenly spaced buttons 
numbered 1 to 10, 10 pixels apart.

on mouseUp
   select me
   repeat with n = 2 to 10
     clone the selectedobject
     select it
     move the selectedobject relative 18,-32 without waiting
     set the name of the selectedobject to "Btn"&n
     set the label of the selectedobject to n
     set the script of the selectedobject to empty
   end repeat

end mouseUp

When I click on the button. The handler executes correctly producing 
10 buttons numbered 1 to 10 except for the position of the last 8.

The first cloned button is level and to the right of the 'parent' 
button while the rest are offset by the standard 32 x 32 pixels.

The strange thing is that when I set a breakpoint in the script and 
step through it, ALL buttons are positioned correctly. Its only when 
the script is run normally that the positions are off.

I have tried the script in Revolution 2.0.1 and Revolution Media V 
2.7.1 Build 224 with identical results.

Am I missing something?

Many thanks for your advice.

Ian McKnight 


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.4.0/305 - Release Date: 08/04/2006





More information about the use-livecode mailing list