Page 1 of 1
Place Group
Posted: Sat Feb 03, 2018 4:22 pm
by chelling
I tried to place a group onto a card with both of these scripts and it didn't work. The group "Behave like a background" property is true. Why wouldn't these work? I am using Mac 10.12.6 and LiveCode Business 8.1.6. I went ahead and placed them manually but am curious.
place group "NavBarGroup" onto this card
Put the short name of this card into tCard
place group "NavBarGroup" onto card tCard
Re: Place Group
Posted: Sat Feb 03, 2018 5:25 pm
by jmburnod
Hi,
I suppose that your group is in an other cd.
You have to precise it
Code: Select all
place group "MyGroup" of cd "CdWhereIsTheGroup" onto this cd
Best regards
Jean-Marc
Re: Place Group
Posted: Sat Feb 03, 2018 5:33 pm
by chelling
That was it. Thanks!
Re: Place Group
Posted: Sat Feb 03, 2018 5:33 pm
by Klaus
Or:
...
place
background "NavBarGroup" onto this card
...

Re: Place Group
Posted: Sat Feb 03, 2018 5:48 pm
by dunbarx
Cannot let this pass. Klaus makes a subtle and powerful point.
By referring to your group as a "backGround", LC examines the entire stack for such an object, and one need not explicitly find the full "pathname" to the group of interest.
Jean-Marc is correct if you do not use that method.
It is useful to know how both work.
Craig Newman
Re: Place Group
Posted: Sat Feb 03, 2018 7:08 pm
by bogs
<Taking notes, as I was not aware of that> Thanks Klaus!
Re: Place Group
Posted: Sat Feb 03, 2018 7:19 pm
by jmburnod
Jean-Marc is correct if you do not use that method.
Yes, but Klaus's way is better, no need to have the background in a cd