selecting a group

Sarah sarahr at genesearch.com.au
Mon Feb 10 18:51:00 EST 2003


You will have to be more specific if you use this syntax. Your card 
obviously has multiple graphics and unless you specify that you are 
referring to a graphic by it's number within a group, when you ask for 
graphic Z or graphic X, it just takes the number as specifying how they 
are layered on the card. As far as I know, there is no way to set a 
"default group" so that every reference points to that group rather 
than the card in general.

Cheers,
Sarah

On Tuesday, February 11, 2003, at 05:03  am, Zac Elston wrote:

> here's another problem I can't understand.
>
> make a stack, make some things, group the things in two different 
> groups
> with 5 things (2 in xthings and 3 in zthings)
>
> on mouseup
>   put empty into mylist
>   repeat with X = 1 to the number of graphics in group "xthings"
>     put (X && the name of graphic X  && the ID of graphic X  && 
> return) after mylist
>   end repeat
>
>   repeat with Z = 1 to the number of graphics in group "zthings"
>     put (Z && the name of graphic Z  && the ID of graphic Z  && 
> return) after mylist
>   end repeat
>   answer mylist
> end mouseup
>
> the output looks like the group is switched since the number in the 
> first column is correct to the number of items in the group, bu the 
> name and ID is wrong.  It's like the request for graphic 1 is still 
> being made from the previous group.
>
> being specific solves this
>
> on mouseup
>   put empty into mylist
>   repeat with X = 1 to the number of graphics in group "xthings"
>     put (X && the name of graphic X of group "xthings" && the ID of 
> graphic X of group "xthings" && return) after mylist
>   end repeat
>
>   repeat with Z = 1 to the number of graphics in group "zthings"
>     put (Z && the name of graphic Z of group "zthings" && the ID of 
> graphic Z of group "zthings" && return) after mylist
>   end repeat
>   answer mylist
> end mouseup
>
>
> I'd really like to be able to just call an item in a group without 
> have to explictly reference the group.  is this possible?
>
> thanks
> -zac
> _______________________________________________ use-revolution mailing 
> list use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-revolution
>





More information about the use-livecode mailing list