Having strange problem with the 'clone' command

Scott Rossi scott at tactilemedia.com
Tue Jul 6 21:57:23 CDT 2010


You probably know you're running into the default object size -- not sure why.  Out of curiosity, you might see if the behavior occurs in a standalone, just to see if there's some gremlin in your stack.  Also, in addition to the clone command, you could try using the template graphic + the create command. 


Scott RossiCreative DirectorTactile Media, UX Design

-----Original Message-----
From: Alex Tweedly <alex at tweedly.net>
Sender: use-revolution-bounces at lists.runrev.com
Date: Wed, 07 Jul 2010 00:23:12 
To: Revolution Mail List<use-revolution at lists.runrev.com>
Reply-To: How to use Revolution <use-revolution at lists.runrev.com>
Subject: Having strange problem with the 'clone' command



I'm just trying to create a simple array of rectangles .....

I've created one (called, with great imagination :), "R1") which has all 
the correct characteristics, including a width and height of 8

But when I clone it to create my other shapes, the widths and heights 
all come out to 120 instead of 8. I can fix this up (as I do in the 
following code), but I don't understand why that would be necessary (or 
what other properties might be different from what I expect).

>    repeat with y = 0 to 5
>       repeat with x = 0 to 4
>          put "_h01_" & x & y into tName
>          clone grc "R1"
>          set the name of it to tName
>          put the width of grc tName && the width of grc "R1" & CR 
> after field "F"
>          set the loc of grc tName to 100 + 20*x,  150 + 20*y
>          set the width of grc tName to 8
>          set the height of grc tName to 8
>          set the visible of grc tName to true
>          put the width of grc tName && the width of grc "R1" & CR 
> after field "F"
>          put "grc" && quote & tName & quote && "and" & space after 
> tGroupList
>       end repeat
>    end repeat
>
what shows up in the field is
> 120 8
> 8 8
> 120 8
> 8 8
> 120 8
> 8 8
> 120 8
> 8 8
> etc.

I tried to create a tiny sample stack to show the problem, and initially 
succeeded, but at some point as I tried minor variations, it started 
working - and now I can't get it to fail again.  The time it started 
working was when I changed
    clone invisible grc "R1"
to simply
    clone grc "R1"
but changing that back didn't cause the problem to recur.

Any ideas ?
Thanks
-- Alex.



_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list