Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/bundler.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/bundler.py')
-rw-r--r--tutorius/bundler.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tutorius/bundler.py b/tutorius/bundler.py
index 9cbd917..56bbf3e 100644
--- a/tutorius/bundler.py
+++ b/tutorius/bundler.py
@@ -48,8 +48,8 @@ INI_XML_FSM_PROPERTY = "FSM_FILENAME"
INI_FILENAME = "meta.ini"
TUTORIAL_FILENAME = "tutorial.xml"
NODE_COMPONENT = "Component"
-NODE_SUBCOMPONENT = "SubComponent"
-NODE_SUBCOMPONENTLIST = "SubComponentList"
+NODE_SUBCOMPONENT = "property"
+NODE_SUBCOMPONENTLIST = "listproperty"
class TutorialStore(object):
@@ -159,9 +159,9 @@ class XMLSerializer(Serializer):
e.g.
<Component Class="OnceWrapper">
- <SubComponent property="addon">
+ <property name="addon">
<Component Class="BubbleMessage" message="'Hi!'" position="[12,32]"/>
- </SubComponent>
+ </property>
</Component>
When reloading this node, we should look up the property name for the parent
@@ -177,7 +177,7 @@ class XMLSerializer(Serializer):
that represents another component.
"""
subCompNode = doc.createElement(NODE_SUBCOMPONENT)
- subCompNode.setAttribute("property", parent_attr_name)
+ subCompNode.setAttribute("name", parent_attr_name)
subNode = self._create_component_node(comp, doc)
@@ -193,10 +193,10 @@ class XMLSerializer(Serializer):
e.g.
<Component Class="ChainAction">
- <SubComponentList property="actions">
+ <listproperty name="actions">
<Component Class="BubbleMessage" message="'Hi!'" position="[15,35]"/>
<Component Class="DialogMessage" message="'Multi-action!'" position="[45,10]"/>
- </SubComponentList>
+ </listproperty>
</Component>
When reloading this node, we should look up the property name for the parent
@@ -209,7 +209,7 @@ class XMLSerializer(Serializer):
@returns A NODE_SUBCOMPONENTLIST node with the property attribute
"""
subCompListNode = doc.createElement(NODE_SUBCOMPONENTLIST)
- subCompListNode.setAttribute("property", parent_attr_name)
+ subCompListNode.setAttribute("name", parent_attr_name)
for comp in comp_list:
compNode = self._create_component_node(comp, doc)
@@ -402,7 +402,7 @@ class XMLSerializer(Serializer):
Loads all the subcomponent node below the given node and inserts them with
the right property name inside the properties dictionnary.
- @param node The parent node that contains one or many SubComponent nodes.
+ @param node The parent node that contains one or many property nodes.
@param properties A dictionnary where the subcomponent property names
and the instantiated components will be stored
@returns Nothing. The properties dict will contain the property->comp mapping.
@@ -410,7 +410,7 @@ class XMLSerializer(Serializer):
subCompList = self._get_direct_descendants_by_tag_name(node, NODE_SUBCOMPONENT)
for subComp in subCompList:
- property_name = subComp.getAttribute("property")
+ property_name = subComp.getAttribute("name")
internal_comp_node = self._get_direct_descendants_by_tag_name(subComp, NODE_COMPONENT)[0]
internal_comp = self._load_xml_component(internal_comp_node)
properties[str(property_name)] = internal_comp
@@ -426,7 +426,7 @@ class XMLSerializer(Serializer):
"""
listOf_subCompListNode = self._get_direct_descendants_by_tag_name(node, NODE_SUBCOMPONENTLIST)
for subCompListNode in listOf_subCompListNode:
- property_name = subCompListNode.getAttribute("property")
+ property_name = subCompListNode.getAttribute("name")
subCompList = []
for subCompNode in self._get_direct_descendants_by_tag_name(subCompListNode, NODE_COMPONENT):
subComp = self._load_xml_component(subCompNode)