On the subject of things with the same short name... ('identical' groups which behave differently)

Sean Cole (Pi) sean at pidigital.co.uk
Fri Oct 8 05:58:14 EDT 2021

The message path looks for the first instance it finds with a given name.
As your script is within the group itself, it would be easier (lazier ;) )
to reference to each group as 'me'
lock screen for visual effect in rect (the rect of me)

rather than 'the rect of the long name of me'


On Fri, 8 Oct 2021 at 10:32, David Glasgow via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Being essentially a lazy and a sloppy programmer, I made a group which
> contained a script that caused the group to do what I wanted.  Then I
> copied it again and again, and grouped the resultant groups.   Rather than
> adapting the script to be located on the card I just left several identical
> scripts in groups which have the same short name.  I told you.  Lazy.
> However, all groups worked absolutely fine.
> I then decided to add a visual effect to the final unlock screen in each
> instance.  I tried a couple of groups to see how it would look, and I found
> that it worked perfectly on one group, but not a second, identical(?)
> group.
> The script is...
> +++++++++++
> on mouseup
> lock screen for visual effect in rect (the rect of the long name of me)
> **depending on target object which was clicked, change appearance of group
> here**
> unlock screen with visual wipe right slow
> end mouseup
> +++++++++++
> There are no other locks or unlocks.
> The weird thing is that the script runs without error in both cases.  The
> final appearance of the group in both cases is exactly what I would
> expect.  However, the visual effect manifests itself in one instance, but
> not the other.  I was bit hesitant about 'the rect of the long name of me’,
> but as I keep saying, it seems to works perfectly in one case.
> Que pasa?
> (  Mac 10.13.6 and LC 9.6, if that makes a difference.)
> Best Wishes,
> David Glasgow
> Consultant Forensic & Clinical Psychologist
> Carlton Glasgow Partnership
> Director, Child & Family Training, York
> Honorary Professor, Nottingham Trent University (SOCAMRU)
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

More information about the use-livecode mailing list