[Twisted-Python] RFC - List hierarchies in Woven
Abe Fettig
abe at fettig.net
Mon Aug 11 13:29:28 MDT 2003
On Mon, 2003-08-11 at 11:54, Bob Ippolito wrote:
> On Monday, Aug 11, 2003, at 11:15 America/New_York, Abe Fettig wrote:
> > Fair enough - I just put it into List since it's only a few additional
> > lines of code, and I didn't want to have to copy-paste the existing
> > List
> > widget.
>
> Couldn't you have done it by subclassing List?
Well, yes, but since I'm modifying the behavior of _iterateData it still
means copying and pasting half the code. Although if I end up using a
model that's incompatible with ListModel than I'll be would be required
to do this anyway.
I've attached a second demo that provides a Tree widget class that
inherits from List. This widget takes a Model made up of nested lists,
instead of the objects-with-.children I was using before.
Again, comments are invited.
Abe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-demo2.py
Type: text/x-python
Size: 1757 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20030811/da42abf4/attachment-0002.py>
More information about the Twisted-Python
mailing list