-----Original Message----- From: chas [mailto:panda@skinnyhippo.com] Sent: Wednesday, September 29, 1999 11:53 AM 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)
I read that line of code you wrote and smiled/laughed to myself because :
a) Just how intuitive is '_.None, _' ?
Not very. Last week I proposed a new semantic to the <dtml-var> tag. <dtml-var aMethodThatWantsArguments arguments="{'arg1':value, 'arg2':value}"> This is identical to: <dtml-var "aMethodThatWantsArguments(_.None, _, arg1=value, arg2=value)"> I think the first is a *little* cleaner. Just FYI, the first argument to a DTML Method is the 'client object', this is commonly '_.None'. If you want a DTML method to get its namespace from an object, pass it in as the client. For example, you could pass in 'this()' to use yourself as the client. The '_' object is the namespace stack, which is a collection of all namespaces in your current context. So, a DTML Method can be given a namespace in three ways: o With a client object o With a namespace mapping o With keyword arguments
b) Where on earth do you dig all this stuff up from ? I swear you've got different documentation from everyone else. You must live in the source.
The topic has been discussed on the list before (Now that it's searchable, you can find out where http://www.zope.org:12080/archives/Catalog/S) -Michel