[Zope] where are you sticking site-wide methods/resources ? ( too manyDTML-WITH's) DTML-WITH's)

Jay, Dylan djay@lucent.com
Thu, 30 Sep 1999 10:23:41 +1000


> -----Original Message-----
> From: chas [mailto:panda@skinnyhippo.com]
> Sent: Thursday, September 30, 1999 01:53
> To: Kevin Dangoor
> Cc: zope@zope.org
> Subject: Re: [Zope] where are you sticking site-wide 
> methods/resources ?
> (too manyDTML-WITH's) DTML-WITH's)
> 
> 
> 
> >>><dtml-var "Imports.folder.method()">
> >>
> >>One of the first things I tried as I remember. Worked OK for
> >>simple methods but for more complex methods :
> >>
> >>a) variables kept disappearing (which means I really don't grok
> >>   this acquisition business yet).
> >>
> >>b) the DTML method could no longer 'import' other things.
> >
> >Try this:
> >
> ><dtml-var "Imports.folder.method(_.None, _)">
> >
> >This will pass the namespace to the method, and possibly fix 
> a & b above...
> 
> I read that line of code you wrote and smiled/laughed to 
> myself because :
> 
> a) Just how intuitive is '_.None, _' ?  

The '_.None,_' trick fixes lots of problems and its really not intuitive at
all. Is there way in which the namespace can be passed in by default in an
expression? I imagine "folder.method" will mean the method object rather
than a call but is it possible that "folder.method()" can be made equivalent
to "folder.method(_.None, _)"???? Or would this screw somthing up
fundamental?