[moved to dev list] Ed Leafe wrote: > On Mar 29, 2009, at 12:08 AM, Ricardo Aráoz wrote: > >> And yet there is no way to reproduce the testing code found in >> dabo/dabo/ui/uiwx/dTreeView.py outside of this file. You won't be able >> do do : >> class TestNode(dNode): >> def afterInit(self): >> self.ForeColor = "darkred" >> self.FontItalic = True >> self.FontSize += 3 >> >> and then myTree.NodeClass = TestNode as is done in the test. So you >> can >> not subclass a node nor change or add to it's behaviour. > > > 'dNode' is defined in the namespace of dTreeView; it is not defined > outside. For that, we provide a classmethod 'getBaseNodeClass()' that > will return a reference to the class; this is by design, because he > idea is to keep the node as a Dabo abstraction. > > If you change the class definition line above to read: > > class TestNode(dabo.ui.dTreeView.getBaseNodeClass()): > > ...you should be able to do what you want.
Is there a particular reason not to expose dNode to dabo.ui? We expose dColumn... Paul _______________________________________________ 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]
