Shifting the Controls out of the Card
Thierry Douez
th.douez at gmail.com
Mon Apr 22 08:41:13 EDT 2013
Hi,
What about the comma as a separator
between the x and y location ?
set the loc of button x of me to (-240 &comma& randomInRange(40,108))
Thierry
------------------------------------------------
Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage
2013/4/22 Ender Nafi Elekçioğlu <endernafi at gmail.com>
> 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
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list