[ZPT] Re: macros and contexts
Dieter Maurer
dieter at handshake.de
Mon Sep 22 12:58:25 EDT 2003
Chris Withers wrote at 2003-9-22 10:36 +0100:
> ...
> Dieter Maurer wrote:
> > Chris Withers wrote at 2003-9-17 12:06 +0100:
> > > Dieter Maurer wrote:
> > > > > What leads you to feel differently?
> > > >
> > > > The assumption is, that "widgetlib" can be acquired from "here".
> > > > Such an assumption should not be necessary (inside the widget library).
> > >
> > > Good point, he should perhaps use container or template to acquire widgetlib
> > > from there.
> > >
> > > Either than, or make widgetlib globally acquirable...
> >
> > These are work arounds necessary at the moment.
> >
> > It would be nice when they would not be necessary for some
> > future PageTemplate version.
>
> I think implicit acquisition is central to Zope 2, so I don't see them as
> workarounds.
The workaround is *NOT* that we use (implicit) acquisition.
The workaround is that the "widgetlib" must know how *IT* can be
accessed from "here/container" (or any other base depending not
on "widgetlib" but the template which happens to be rendered).
A widget library should be able to reference other members in the
library *WITHOUT* recurrence to the user of the widget library.
Think about it!
How funny would it be when the "fprintf" in
the standard C library had to reference "write" (as well in
the standard C library) via the program which happens to use
"fprintf"...
Fortunately, "C" has no "acquisition".
Therefore, there is a more direct solution :-)
Dieter
More information about the ZPT
mailing list