simple custom property question

Brian Yennie briany at qldlearning.com
Mon Aug 1 21:08:32 EDT 2005


Charles,

I believe the problem you are having is that you are going to the 
substack and then using a short reference to the group, which of course 
does not exist yet in the substack.

I think you want one of these methods. I don't know if one of them is 
preferable to the other, but hopefully illustrative of the issue. 
Basically, you either need to give the long name of the group object, 
or else point Revolution to what stack it should use for interpreting 
the short name.

1) Use a long name for the group

open stack "mySubstack"
copy group "myGroup" of card 1 of stack "myMainstack" to stack 
"mySubstack"

2) Use the defaultStack property

open stack "mySubstack"
set the defaultStack to "myMainStack"
copy group "myGroup" to stack "mySubstack"

> OK, I believe you. But I'm missing something really simple about how 
> to do it. (I haven't used this syntax before.) If the group is on one 
> card in my main stack (with its Visible set false), and in the script 
> of a button on the same card I open a substack and try to copy the 
> group to it, I get an error. If I say
>
>     copy myGroup to stack mySubstack
>
> the error is "can't find object"; if I say
>
>     copy group myGrouop myGroup to stack mySubstack
>
> the error is "can't find background". What basic fact(s) am I 
> forgetting?
>
> Thanks for any available hand-holding. The Doc write-up on groups and 
> backgrounds is obviously relevant, but I can't parse an answer to this 
> question out of it.
>
> Charlesd
>
>
> On Aug 1, 2005, at 12:06 PM, Ken Ray wrote:
>
>> How about just creating the group in an offscreen stack (or substack) 
>> and
>> then doing "copy group <groupDesc> to <targetLoc>" every time you 
>> want an
>> "instance" of the group?
> _______________________________________________
> 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