setting menuhistory in a repeat loop
Jim Lambert
jiml at netrin.com
Thu May 29 23:03:37 EDT 2008
>
> I have a handler with a repeat loop that steps thru a list of button
> IDs.
> The first time I set the menuhistory of one of these buttons, the
> repeat loop and the entire handler exits to top without completing.
Found the answer. Instead of:
repeat with x = 1 to 4
set the menuhistory of btn ("myBtn" & x) to someNumber
end repeat
which will exit to the top as soon as myBtn1's menuhistory is set,
leaving the remaining buttons unset, try good old send:
repeat with x = 1 to 4
send "set the menuhistory of btn" && ("myBtn" & x) to someNumber
end repeat
Jim Lambert
More information about the use-livecode
mailing list