[Zope] VERY Confused!
Ben Ocean
zope@thewebsons.com
Wed, 24 Oct 2001 07:53:12 -0700
That is some pretty funky code, Seb, but it worked! Would you *please*
explain what you did? Especially the syntax with all the wild punctuation!
The idea of this, my first external method, was to keep_it_simple. So much
for that. Here's the line that worked:
<span class="top"><img src="images/top" width=<dtml-var
"sizeCalc(1008,sizer(_.None,_))"> height=<dtml-var
"sizeCalc(82,sizer(_.None,_))">></span>
Thanks for your help!
BenO
At 10:17 AM 10/24/01 +0100, you wrote:
>I'm taking this back on the list - it could be useful to others, and
>someone else might have some better explanation for you...
>
>* Ben Ocean <beno@thewebsons.com> [011023 21:55]:
> > >How exactly are you checking the types of the parameters? You need to
> > >find out what they really are, and I'd bet money on them not being
> > >strings.
>
> > When I rewrite sizeCalc()
> >
> > def sizeCalc(x,y):
> > return type(y)
> >
> > I get this:
> > <span class="top"><img src="images/top" width=<extension class
> > Acquisition.ImplicitAcquirerWrapper at 401aa2e0> height=<extension class
> > Acquisition.ImplicitAcquirerWrapper at 401aa2e0>></span>
>
>OK, all objects in zope are ImplicitAcquirerWrappers - that's what
>makes Acqusition work. Why your dtml method should be returning an
>Acquisition wrapper instead of an int, I'm not sure. I suspect that
>somehow the DTML method is not getting called in your dtml, and you're
>getting the method object instead.
>
>Try explicitly calling the DTML Method, using something like:
>
> <dtml-var "1008, size(_.None, _)">
>
>seb