changeset 107:d456334d09c0

Fixed bugs in the container functions.
author KarstenBock@gmx.net
date Fri, 23 Sep 2011 13:30:17 +0200
parents f3ace79da781
children 2f928c913c78
files src/parpg/components/container.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/components/container.py	Fri Sep 23 12:58:32 2011 +0200
+++ b/src/parpg/components/container.py	Fri Sep 23 13:30:17 2011 +0200
@@ -70,8 +70,8 @@
         if len(container.children) >= (slot_or_type + 1):
             return container.children[slot_or_type]
     else:
-        for item in container.children:
-            if child and child.type == slot_or_type:
+        for child in container.children:
+            if child and child.item_type == slot_or_type:
                 return child
                 
     return None
@@ -85,8 +85,8 @@
             item.container = None
             item.slot = -1
     else:
-        for item in container.children:
-            if child and child.type == slot_or_type:
+        for child in container.children:
+            if child and child.item_type == slot_or_type:
                 container.children[child.slot] = None
                 child.container = None
                 child.slot = -1