+1
Completed

Load a wire within a wire.

icahill (Administrator) 12 years ago updated by sovtek 11 years ago 3
Using a combination of the tag and an object you can load additional .wire files into your main.wire file.

The include tag acts as the container for the secondary wire to live while the load action can be used to load the wire file into the include object.

Check out the wire definition for more information on these tags.


<main>
<panel name="issue1" width="45%" height="100%" xpos="10%" ypos="2%" onclick="launch-issue" _wire="ISSUE1.wire" _wirename="Issue1"></panel>
<include name="issue" alias="ISSUE" width="100%" height="100%" background="#000000" alpha="0"></include>
</main>
<actions>
<action name="launch-issue">
<load file="_wire" wirename="_wirename" target="ISSUE" />
</action>
</actions>
Hey Ian, let's say I have this within my main.wire, and I want to load my issue.wire within it. Each of my issues are within a subdirectory.

- main.wire
- issue1
     - issue1.wire
- issue2
     - issue2.wire

How would i structure this call to load these subwires that are within subdirectories?
You would need to change your file to path to the wire to dive into a folder first:


<wire>
<main>
<panel name="issue1" width="45%" height="100%" xpos="10%" ypos="2%" onclick="launch-issue" _wire="issue1/ISSUE1.wire"></panel>
<include name="issue" alias="ISSUE" width="100%" height="100%" background="#000000" alpha="0"></include>
</main>
<actions>
<action name="launch-issue">
<load file="_wire" target="ISSUE" />
</action>
</actions>
</wire>