Steve Alexander wrote:
> 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.
The exact turn of events is that index_html is a DTML method which shows
a DTML _docum
Chris Withers wrote:
> ...which doesn't give quite what I want
> objects[-1] should be the object getting rendered, however, for folders
> getting rendered where index_html is a DTML document, it is the
> index_html document.
Well, I think I solved it for now, but this is horrible! ;(
def navTre
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 's
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
Steve Alexander wrote:
> Both.
> def external_method(self, ...other args...):
> > ?
I'll go with this advice since I still can't make heads or tails which
of the two Shane thinks I need to do ;-)
Of course, it's not documented like this. I think the docs say just make
sure the def has self as
Chris Withers wrote:
>
> Shane Hathaway wrote:
> > that last algorithm falls to pieces. The solution is to always provide
> > the "self" argument.
>
> When calling or in the signature of your external method?
>
> If the former, then would that have to be:
>
> ?
Yes, sorry I didn't make that
Chris Withers wrote:
>
> Shane Hathaway wrote:
> > that last algorithm falls to pieces. The solution is to always provide
> > the "self" argument.
>
> When calling or in the signature of your external method?
Both.
Declare it like this:
def external_method(self, ...other args...):
Use it
Shane Hathaway wrote:
> that last algorithm falls to pieces. The solution is to always provide
> the "self" argument.
When calling or in the signature of your external method?
If the former, then would that have to be:
?
cheers,
Chris
___
Zope-De
Steve Alexander wrote:
>
> Chris Withers wrote:
> > I have an external method called navTree (dtml-tree was too broken to
> > fix in the time frame :( ) with a spec as follows:
> >
> > def navTree(self,start):
> >
> > It's called in some DTML as:
> >
> >
> >
> > which is fine, unless I call it w
Chris Withers wrote:
>
> I think this is a bgu so I'll chuck it into the collector unless someone
> tells me otherwise...
>
> I have an external method called navTree (dtml-tree was too broken to
> fix in the time frame :( ) with a spec as follows:
>
> def navTree(self,start):
>
> It's called
10 matches
Mail list logo