Copy to Group problems

J. Landman Gay jacque at hyperactivesw.com
Fri Jan 13 16:36:16 EST 2012


On 1/13/12 2:55 PM, user wrote:

>
> on addFldDoublet theGroup
>     put the number of grps in grp theGroup into lastDoublet
>     put the short name of grp lastDoublet of grp theGroup into lastName
>     put the left of grp lastName into newLeft
>     put (the bottom of grp lastName +2) into newTop
>     put lastName into nextName
>     set itemDelimiter to "_"
>     add 10 to last item of nextName
>     set itemDelimiter to ","
>     copy grp lastName to grp theGroup
>     set the name of the last grp to nextName
>     answer the short name of the last grp -- confirms the correct name
>     put the short name of the last grp into newGrp
>     answer newGrp -- confirms the correct name
>     set the left of grp newGrp to newLeft
>     set the top of grp newGrp to newTop
> end addFldDoublet
>
> FYI - assume the name of grp lastDoublet is "DB_Doublet_160"
>
> Group newGrp is supposed to be "DB_Doublet_170" and this appears to
> be confirmed by the two "answer" commands I've inserted in the script
> to verify.
>
> But after the script runs, it turns out that the new group is also
> named "DB_Doublet_160" instead of "DB_Doublet_170" (which does not
> seem to exist, even though the second "answer" test shows that it did
> ), and the new group is positioned right on top of the old group, and
> not offset to to newTop as desired (2 pixels below the bottom of the
> old group.

It should work. Are you seeing the label of the new group instead of its 
actual name? (Not the field label object, but label property of the 
group itself.)

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list