changeset 77:180cbd2b5da8

Fixed bugs in the container functions.
author KarstenBock@gmx.net
date Fri, 23 Sep 2011 13:30:17 +0200
parents 4cf150131139
children a57ec730e753
files components/container.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/components/container.py	Fri Sep 23 12:58:32 2011 +0200
+++ b/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