Shifting the Controls out of the Card

Ender Nafi Elekçioğlu endernafi at gmail.com
Mon Apr 22 08:59:38 EDT 2013


The random function works ok,  
the locs of buttons are like this:
20,42
20,68
20,106
20,74
…

If I put the *answer* dialog then like this:
-240,54
-240,48
-240,97
…


~ Ender Nafi

~… together, we're smarter …~  



On Monday, April 22, 2013 at 3:49 PM, Thierry Douez wrote:

> Ok, then I would check the result of your random..
>  
> Thierry
>  
> ------------------------------------------------
> Thierry Douez - http://sunny-tdz.com
> Maker of sunnYperl - sunnYmidi - sunnYmage
>  
>  
> 2013/4/22 Ender Nafi Elekçioğlu <endernafi at gmail.com (mailto:endernafi at gmail.com)>
>  
> > Hi Thierry,
> >  
> > Sorry, it's a typo :/
> > The actual code has *comma* :)
> >  
> >  
> >  
> > ~ Ender Nafi
> >  
> > ~… together, we're smarter …~
> >  
> > On Monday, April 22, 2013 at 3:41 PM, Thierry Douez wrote:
> >  
> > > 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 (mailto:endernafi at gmail.com) (mailto:
> > endernafi at gmail.com (mailto: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 (mailto: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
> > > >  
> > >  
> > >  
> > > _______________________________________________
> > > use-livecode mailing list
> > > use-livecode at lists.runrev.com (mailto: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
> >  
> >  
> >  
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com (mailto: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
> >  
>  
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com (mailto: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