[z3-checkins] r14802 - z3/zopejam/trunk/src/zopejam

hathawsh at codespeak.net hathawsh at codespeak.net
Wed Jul 20 09:52:20 CEST 2005


Author: hathawsh
Date: Wed Jul 20 09:52:18 2005
New Revision: 14802

Modified:
   z3/zopejam/trunk/src/zopejam/propbook.py
Log:
consider all base interfaces when computing the list of grid columns

Modified: z3/zopejam/trunk/src/zopejam/propbook.py
==============================================================================
--- z3/zopejam/trunk/src/zopejam/propbook.py	(original)
+++ z3/zopejam/trunk/src/zopejam/propbook.py	Wed Jul 20 09:52:18 2005
@@ -45,20 +45,25 @@
     def __init__(self, directives):
         wx.grid.PyGridTableBase.__init__(self)
         self.directives = directives
-        attrs = {}
+        ifaces = {}  # { name -> InterfaceInfo }
         for d in directives:
             t = d.getType()
             if t is not None:
                 info = t.getSchemaInfo()
-                attrs.update(info.attributes)
-        attrs = attrs.keys()
-        attrs.sort()
+                ifaces[info.name] = info
+                for base in info.sro:
+                    ifaces[base.name] = base
+        fields = {}
+        for info in ifaces.values():
+            fields.update(info.fields)
+        names = fields.keys()
+        names.sort()
         self.columns = [
             columns.SourceFile(),
             columns.DirectiveType(),
             ]
-        for a in attrs:
-            self.columns.append(columns.SchemaAttribute(a))
+        for name in names:
+            self.columns.append(columns.SchemaAttribute(name))
 
         # prepare self.cell_attrs
         self.cell_attrs = {}  # {(valid, editable, has_error): GridCellAttr}


More information about the z3-checkins mailing list