[Zope-Coders] ZTUtils.Tree.TreeMaker enhancement in 2.6, 2.5?

Tres Seaver tseaver@zope.com
07 Oct 2002 12:03:01 -0400


On Mon, 2002-10-07 at 10:28, Martijn Pieters wrote:

> Those who follow the Zope checkins lists may have seen I have been working
> on the ZTUtils.Tree package, fixing some items, adding tests, and, on the
> Zope HEAD, adding some additional features.
> 
> On the HEAD, there are basically two new features for TreeMaker:
> 
> - Attributes that start with an underscore, which influence how the tree
>   gets built, have been given setter methods so they can be changed from
>   PythonScripts.
> 
> - Through the new setStateFunction call, one can now instruct the TreeMaker
>   to ask an arbitrary function, for each node constructed, what that
>   function thinks the state for that function should be. The function is
>   passed in the current object, what state the TreeMaker has determined the
>   node should be in, and the returned result of the function is used for the
>   actual state.
> 
> The latter functionality allows you to set the state of any node to open
> (children will be processed), closed, and leaf node. This is far far easier
> than using an expansion map, which requires knowledge about the whole tree
> in advance and internal knowledge of how TreeMaker distinguishes between
> nodes.
> 
> I would like to merge back at least the state function functionality to 2.6
> (and maybe 2.5 as well if there is demand). I need this functionality for a
> customer engagement, although I can always monkey-patch the Zope
> installation. Thanks to the tests I added (already available in 2.5 and
> 2.6), I am 100% confident that the new functionality does not break existing
> functionality.
> 
> Please let me know your thoughts on this. A +1 if you agree (optinally
> qualified with Zope branch numbers) would do, and I'd appreciate motivation
> if you deem this -1.

+1 for the HEAD and 2.6;  -1 for 2.5 (I *really* want us to tighten up
about the kinds of backports we make to the 2.5 branch).

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com