You are not logged in.

zyON

Trainee

  • "zyON" started this thread

Posts: 70

Location: Lisboa, Portugal

  • Send private message

1

Wednesday, December 19th 2012, 5:39pm

Problem having two or more plugin/layer containers

Building on my last post about Parent-Child relationships and the new type="container" (Parent - Child with the new type="container" *SOLVED*), It seems that I'm not able to define two containers like this:

Source code

1
2
3
4
5
6
7
8
<layer name="floor1" keep="true" type="container" width="1" height="1" >
		<layer name="child1" keep="true" url="common/mappoint.png" align="center" x="50" y="50" />
		<layer name="child2" keep="true" url="common/mappoint.png" align="center" x="150" y="50" />
</layer>
<layer name="floor2" keep="true" type="container" width="1" height="1" >
		<layer name="child1" keep="true" url="common/mappoint.png" align="center" x="100" y="150" />
		<layer name="child2" keep="true" url="common/mappoint.png" align="center" x="150" y="150" />
</layer>


The first one appears but not the second one. Why? *unsure*
––––•(-• zyON •-)•––––

zyON

Trainee

  • "zyON" started this thread

Posts: 70

Location: Lisboa, Portugal

  • Send private message

2

Wednesday, December 19th 2012, 5:51pm

Hmmm... it seems like you can't duplicate layer/plugin names. It makes sense.
it should be like this:

Source code

1
2
3
4
5
6
7
8
<layer name="floor1" keep="true" type="container" width="1" height="1" >
		<layer name="child1" keep="true" url="common/mappoint.png" align="center" x="50" y="50" />
		<layer name="child2" keep="true" url="common/mappoint.png" align="center" x="150" y="50" />
</layer>
<layer name="floor2" keep="true" type="container" width="1" height="1" >
		<layer name="child3" keep="true" url="common/mappoint.png" align="center" x="100" y="150" />
		<layer name="child4" keep="true" url="common/mappoint.png" align="center" x="150" y="150" />
</layer>
––––•(-• zyON •-)•––––

3

Thursday, December 20th 2012, 11:02am

Hi,

right, each name must be unique.
Accessing each element by code is always directly possible - e.g. via 'layer[name]' - regardless if that element was a child element or a parent element.

Best regards,
Klaus