Re: [Zope] dtml-tree and a filtered objectValues

2001-01-10 Thread Jim Hebert

On Wed, 10 Jan 2001, Dieter Maurer wrote:

> I tried to reproduce this in Zope 2.3 CVS.

Sorry, shoulda mentioned, this error came from 2.2.4, and apologies for
not testing against at least 2.2.5 first, I managed to miss its release
entirely... (I still haven't gotten around to installing it so I can't say
if it's mysteriously fixed in 2.2.5 or what.)

On that note, if I have a (different) 2.1.6 site I'm about to take down
and migrate to a current release, should I go with 2.2.5 or try to track
2.3 CVS? I was planning on going with 2.2.x, but if the version in cvs is
_more_ mature than the previous release...

Thanks,

jim




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] dtml-tree and a filtered objectValues

2001-01-10 Thread Dieter Maurer

Jim Hebert writes:
 > 
 > DMTL method "y":
 > OK, this works:
 > 
 > My DTML Method, "y":
 > 
 > ...
 > used as:
 > 
 >  ...
 > causes:
 >   Error Type: AttributeError
 >   Error Value: __getitem__

I tried to reproduce this in Zope 2.3 CVS.

I had to replace "_" by "_vars", as "_" gave me
a "NameError: _" (do not know why), but otherwise,
it worked.

I got your error, too, when I tried 'branches_expr="y"',
but that is expected, because in this case, the
expression evaluates to a DTML method and does not
have a "__getitem__" as required by "tree".


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] dtml-tree and a filtered objectValues

2001-01-09 Thread Jim Hebert

OK, this works:

My DTML Method, "y":


foo


If I change z to read as follows, it breaks:


foo


where y is a DTML Method simply containing



The error I get is:

  Error Type: AttributeError
  Error Value: __getitem__
...
Traceback (innermost last):
  File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /usr/local/Zope-2.2.4-src/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: y)
  File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: y)
  File /usr/local/Zope-2.2.4-src/lib/python/OFS/DTMLMethod.py, line 172,
in __call__
(Object: y)
  File /usr/local/Zope-2.2.4-src/lib/python/DocumentTemplate/DT_String.py,
line 528, in __call__
(Object: y)
  File /usr/local/Zope-2.2.4-src/lib/python/TreeDisplay/TreeTag.py, line
154, in render
(Object: a tree tag)
  File /usr/local/Zope-2.2.4-src/lib/python/TreeDisplay/TreeTag.py, line
260, in tpRender
(Object: ApplicationDefaultPermissions)
  File /usr/local/Zope-2.2.4-src/lib/python/TreeDisplay/TreeTag.py, line
324, in tpRenderTABLE
(Object: ApplicationDefaultPermissions)
AttributeError: (see above)


This is my boiled down example. The real need for this is because I don't
wish to use the full objectValues list, I have another DTML Method which
does this:











So, for those who are interested in the story, I've been using NFGnav, and
have a fair amount of effort invested in marking things as Reference in
NFGnav or not, and would like to move to a dtml-tree which respects that
setting. The dtml method above gives me a subset of objectValues, those
which are maked 'Reference in NFGnav.'

Note, also, that this works (stolen from someone on zope.org's tips for
debugging a tree):

 
  <>
   
<>
   
 

where nfgObjectValues is the dtml method above.

Any help? Is this a bug in dtml-tree, given that it pukes on something
that dtml-in doesn't?

Thanks,
jim


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )