Code:

    def load_record(self, parent, value):
        "Load a record with a specified value."
        # This conditional works around an apparent bug.
        # iter_children doesn't accept None as a synonym for the root.
        sibling = None
        if parent != None:
            print "Looking at: ", parent
            sibling = self.gtk_model.iter_children(parent)
            while sibling:
                if cmp(self.gtk_model.get_value(sibling, OakumGUI.payload_column), 
value) > 0:
                    break
                sibling = self.gtk_model.iter_next(sibling)
        recordlevel = self.gtk_model.insert_before(parent, sibling)


Error trace:

Looking at:  <GtkTreeIter at 0x83afbe8>
Traceback (most recent call last):
  File "./oakum.py", line 1047, in on_data_field_accept
    self.add_item_post(here)
  File "./oakum.py", line 980, in add_item_post
    newrow = self.load_name(zc,text,dnsrecord)
  File "./oakum.py", line 781, in load_name
    namelevel = self.load_record(zone_cursor, dns_name)
  File "./oakum.py", line 767, in load_record
    sibling = self.gtk_model.iter_children(parent)
TypeError: parent should be a GtkTreeIter

Now, maybe I'm screwing up in some obscure way.  But it certainly
looks as though the iter_children method call at line 767 is rejecting
the same value of parent that was recorded as a GtkTreeIter on line 766.

I had previously noted that iter_children doesn't accept a None
argument as an iter object meaning the model root.

Are there any known bugs in iter_children?  Are there diagnostics I
could run to understand this problem better?
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

A right is not what someone gives you; it's what no one can take from you. 
        -- Ramsey Clark
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to