After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 311459 - Misleading GenericTreeModel example
Misleading GenericTreeModel example
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: general
2.5.x/2.6.x
Other Linux
: Normal minor
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-25 10:09 UTC by Stephen Kennedy
Modified: 2006-04-02 19:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
checking all cases for iter == None (1.65 KB, patch)
2005-07-25 10:10 UTC, Stephen Kennedy
none Details | Review

Description Stephen Kennedy 2005-07-25 10:09:22 UTC
The treemodel.py example does not cover all the cases which
a real tree model should cover.

For instance the following change should not break the
example, which it does.

          model = MyTreeModel()
+         model = model.filter_new()
          tree_view = gtk.TreeView(model)

It can be fixed by checking the special case of iter==None
in every method, but it's unclear if that is overkill.
Comment 1 Stephen Kennedy 2005-07-25 10:10:02 UTC
Created attachment 49704 [details] [review]
checking all cases for iter == None