[Zope-dev] External Method Missery

Steve Alexander steve@cat-box.net
Thu, 13 Jul 2000 10:50:55 +0100


Chris Withers wrote:
> 
> Shane Hathaway wrote:
> > Here's the logic: ExternalMethod sets up func_* attributes so it can
> > masquerade as a function.  The trick works well enough to convince
> > ZPublisher's mapply() to pass in a "self" argument as the first
> > argument when needed.
> 
> What 'self' does mapply pass? I always though it would be the object
> being rendered (the one that would appear before PARENTS[0] in PARENTS
> if such a thing were possible ;-) but it appears to in fact be
> PARENTS[0].
> 
> ...which seems silly

Ah... but are you calling the external method from a DTML method? These
are all methods, and therefore you'd expect the "self" object to be the
object the methods are subobjects of.


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net