This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients terry.reedy
Date 2017-09-28.04:22:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506572563.13.0.466225441844.issue31552@psf.upfronthosting.co.za>
In-reply-to
Content
The main issue for conversion is expanding nodes.  tree.py does not define a widget class.  Rather, is uses a used a canvas and places images and text thereupon.  The latter is done with instances of TreeNode.  Each instance thereof is initialized with an instance of a subclass of TreeItem.  TreeItems can tell their TreeNode whether they can generate children without actually doing so.

Treeview *is* a widget which manages internal column and line structures.  Clicking a [+] or [-] icon generates a '<<TreeviwOpen>>' or '<<TreeviewClose>>' event.  Double clicking a line generates both a select and flip event.  The catch is that there is no [+] unless the node already has at least one child.

One solution would be to initially generate the whole tree of Treeview items from the pyclbr tree.  Another is to give items with children a dummy child and replace it on demand.  The item could be given its line number (as a string) as its id.  A subclass of Treeview (or a Frame containing one) could have a dict mapping ids to child dicts).

Since the browser TreeItem subclasses are used by pathbrowser, I would initially move them to that module rather than delete them.  Or I would combine the two modules.
History
Date User Action Args
2017-09-28 04:22:43terry.reedysetrecipients: + terry.reedy
2017-09-28 04:22:43terry.reedysetmessageid: <1506572563.13.0.466225441844.issue31552@psf.upfronthosting.co.za>
2017-09-28 04:22:43terry.reedylinkissue31552 messages
2017-09-28 04:22:42terry.reedycreate