[ZPT] Slots in nested macro definitions
Brad Clements
bkc@murkworks.com
Mon, 17 Dec 2001 13:42:26 -0500
I think this was recently discussed in a topic I brought up.
Does the following thread match this issue?
http://lists.zope.org/pipermail/zpt/2001-December/002507.html
On 17 Dec 2001 at 10:15, dieter.maurer@haufe.de wrote:
Date sent: Mon, 17 Dec 2001 10:15:59 +0100
From: dieter.maurer@haufe.de
To: zpt@zope.org
Subject: [ZPT] Slots in nested macro definitions
> I have a macro with the following nested structure:
>
> define-macro="OuterMacro"
> ...
> define-macro="NestedMacro"
> ...
> define-slot="Slot"
> ...
> /define-macro
> /define-macro
>
> Of course, the reference point for the slot definition is ambiguous:
> is it a slot of "NestedMacro" or of "OuterMacro" or both.
>
> Earlier ZPT versions treated it as a slot for all enclosing macros.
> I used that quite heavily although I have been aware of the
> ambiguity.
>
> Newer versions, especially the current CVS version, treats it
> as a splot definition for the immediate enclosing macro
> only. That's bad for me:
>
> I need a way to fill the slot by 'use-macro="OuterMacro"'.
>
> But, I fear, there is currently no way to influence the body
> of "NestedMacro" by users of the outer macro.
>
> Hopefully, I am wrong...
>
> If not, we should think about defining such a way, probably along
> to following lines:
>
> Currently, a "define-macro" defines a macro *AND* uses
> this macro immediately.
>
> We should either have a way to
>
> * define the macro only (and not automatically use it)
>
> * provide the same customization for the "define-macro"
> (with its implicit "use-macro") we have for "use-macro".
> Especially, allow its slots to be filled by the surrounding
> context.
>
>
> Dieter
>
>
Brad Clements, bkc@murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com AOL-IM: BKClements