this group, versus this background

Jim Hurley jhurley at infostations.com
Mon Apr 19 01:58:58 EDT 2004


I have a stack with one card, and one group with 5 graphic controls. 
This is not a background group.

I have a script line in one of the controls within the group:

     put the short name of this group into theName

This brings up an error message: "Can't find background"

If I change the line to

    put the short name of this background into theName

all is well.

But RR also accepts

    put the short name of first group into theName
    put the short name of last group into theName

(Since there is only one group, these yield the same result.)

But it won't take "this group" despite the fact that this is not a 
group with background behavior. Why does RR recognize "first", 
"last", but not "this" when referring to group, while it does 
recognizer "this background" even though it is a group without 
background behavior?

It is important to me to be able to reference the group using "this" 
since there will be multiple groups with different names, but with 
the same control names, so I can't use ID numbers. That is what I 
want to be able to say in a control within the group:

on mouseUp
   put the short name of this group into theGroupName
   set the r1 of graphic "myGraphic" of group theGroupName  to 8
   etc.

There are other graphics with the same name "myGraphic" but in 
different group on the same card.

I can use "this background" but I don't see why I shouldn't be using 
"this group".

Jim


More information about the use-livecode mailing list