On Sep 6, 2008, at 10:59 AM, Paul McNett wrote:
> So there's no use-case for creating a set of dNodes and adding them
> to a
> tree? Like with dColumn/dGrid?
No, because nodes cannot exist independent of each other; they must
exist in the context of the tree. On those occasions where you want to
define a subclass, you can do:
ndCls = dabo.ui.dTreeView.getBaseNodeClass()
class SubNode(ndCls):
def afterInit(self):
...do some stuff
tree = dabo.ui.dTreeView(self, NodeClass=SubNode)
I originally had the class completely hidden, but the Class Designer
forced me to expose it (and the other internal classes I mentioned) in
order to form the mixed-in classes that would work with the
introspection required for saving and modifying them. The danger in
dealing with the nodes as a class is that a lot of the 'magic' that
goes into managing them and the wxPython implementation of trees lives
in the dTreeView class itself. In the process of trying to manipulate
them in the Class Designer I ran into a lot of places where a
seemingly minor change caused the tree to stop working (at best), and
sometimes a segfault.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]