[ZPT] Permissions, ZPT and absolute_url

Dieter Maurer dieter@handshake.de
Fri, 6 Dec 2002 22:05:32 +0100


Magnus Heino writes:
 > 
 > > Personally, this argument did not convince me. But the issue
 > > it not urgent enough for me that I would try to implement
 > > proxy roles for ZPTs.
 > 
 > I still dont understand how it would work, since we have METAL. Macros ar
 > e 
 > expanded first, then evaluated in the new context. 
Seems that you stress the general problem with macros in the context
of proxy roles:

     References in the macro (especially "template" relative
     references) are likely to be understood relative to
     the macro and not to its caller.

     However, this is not currently not implemented:
     all top level variables are bound by the initial ZPT
     and stay constant during the complete rendering process.

     This makes it difficult to develop macro libraries
     which build bigger macros for smaller macro components.

We can adopt the same policy for proxy roles:

     Proxy roles of the macro defining ZPTs are irrelevant;
     only the one defined by the initial ZPT are relevant.

When we want to solve the whole problem, we must introduce
an evaluation context that changes across macro calls
and slot insertion boundaries and provides the correct context.

This could also handle changes in proxy roles, when we thought
this were necessary.

Unfortunately, the implementation and especially the slot insertion
would be much more difficult. We would need something like
the closures used in functional programming languages (and
Python's nested scope functions).


Dieter