Shifting the Controls out of the Card
Ender Nafi Elekçioğlu
endernafi at gmail.com
Mon Apr 22 08:43:40 EDT 2013
Hi all,
I create a number of buttons on-the-fly.
Their locs are being set out of the card:
_set the loc of tButton to (-240 & randomInRange(40,108))
Yet, it doesn't work and the left of all buttons are set to 0 {the left of card}.
I wrote another handler to position the buttons and call it after creating the buttons,
it doesn't work either:
_on hideTheShapes
__repeat with x=1 to sButtonCount
___set the loc of button x of me to (-240 & randomInRange(40,108))
__end repeat
_end hideTheShapes
However, if I add an *answer* dialog in between then it magically works:
_on hideTheShapes
__answer "wait!"
__repeat with x=1 to sButtonCount
___set the loc of button x of me to (-240 & randomInRange(40,108))
__end repeat
_end hideTheShapes
I replaced the *answer* dialog with *wait x milliseconds* command, but it didn't work.
What's going on here and how can I solve this issue?
Any help much appreciated, thank you…
Best,
~ Ender Nafi
~… together, we're smarter …~
~ · Keehuna Studio
~ · Sorcerers of Design
More information about the use-livecode
mailing list