group a single object?
Scott Rossi
scott at tactilemedia.com
Tue May 11 01:23:57 EDT 2010
Recently, Nicolas Cueto wrote:
> Is there a way to group a single object?
>
> Something like:
>
> select image "img1"
> group image "img1"
> put the ID of the last group into tID
> set the name of group tID to "gpImg1"
You shouldn't need to select anything, you can just write:
group image "img1"
When it comes to groups, however, you can't count on the word "last" to
refer to the last group on the card (if the group you want is nested within
another group, for example). I believe there's a bug report or 2 in the
RQCC about this, but one workaround is to use the templateGroup and
establish a name before grouping the object/s. Like:
set the name of the templateGroup to "mySpecialGroup"
group image "img1"
reset the templateGroup
You can then refer to the group by name, rather than "last".
Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
More information about the use-livecode
mailing list