I've got a weird problem with GtkCTree, and before I tell you what it is
I'll say that I'm using Python2.2aX and pyGTK 0.6.8. I know, but it's
working fine for the most part, I'm developing for a pyGTK-release running
system (Linux on iPAQ), and I can't get the beta of pyGTK1.99 to compile
because of failed dependancies (pkg-config? pango? it can't find glib, but
I have it installed, blahh). If this is going to cause the problem, you
needn't read further- just yell at me to upgrade :). Oh, all the structures
I'm using are those from Python2.0- there's no 2.2 specific stuff in this
one.

Quick problem synopsis: CTree built recursively from a dictionary (dict is
in instance, ie self.dict) in a method of a single class. When I update the
dictionary, freeze() or clear() the tree, then rebuild the tree with the
same method that originally built the tree, it freezes and trips out (words
write on top of words in the tree, branches disappear, etc.) If I freeze()
or clear() the tree, then add a node manually, it works fine. If I don't
return to the original method, but update the dictionary manually, it
freezes. I need a way to update both the tree and dictionary, or otherwise
keep them in sync, because the tree should reflect changes over multiple
runs of the program (It's an expense tracker/calculator). If this is the
wrong way to do it, I guess I can make all changes to the tree directly and
figure out a method to dump the tree to a file.

I'll send code if needed, but thought this might be a conceptual error on
my part, rather than a programming error.

Hmm, just thought of something... can I pickle a CTree and load it on the
next startup, thereby eliminating the need for the dictionary altogether? I
know that *technically* I can, because Pickle can handle arbitrary data
types, but can I from a pyGTK perspective. Not handling the dictionary at
all would save a lot of code!

(By the way James- thank you very much for pyGTK. I was forced into using
it instead of wxPython, but already like it more.) 

-J
-- 
Jonathan Pennington     |       [EMAIL PROTECTED]

         "It's hard to take life too seriously
            when you realize yours is a joke." -me

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to