Refer to new group?

Richmond richmondmathewson at gmail.com
Tue Aug 2 11:45:48 EDT 2016


Just did this:

on mouseUp
    group btn "A" and btn "B"
    set the name of the last group to "GROOOP"
end mouseUp

and it worked.

Why would 'last' not be reliable?

Richmond.


On 2.08.2016 18:37, Richard Gaskin wrote:
> I vaguely recall some new language element recently added to allow us 
> to more reliably refer to newly-created groups.
>
> Apparently the "group" command is an exception to the general rule 
> that "it" will contain the long ID of a newly-created object after a 
> command that creates it.
>
> And using "last" is not always reliable with groups.
>
> After reviewing Release Notes from 8.1 back to 6.7 I can't find 
> mention of such an option.
>
> Am I dreaming?
>
> I was prompted to explore this from this forum thread:
> http://forums.livecode.com/viewtopic.php?f=7&t=27707
>





More information about the use-livecode mailing list