Re: [Zope] "indirection" problem

2000-08-02 Thread Curtis Maloney

On Thu, 03 Aug 2000, David Coe wrote:
> I *think* you've stumbled upon the way _.getitem behaves by default:
>
>
> (from the DTML reference)
>
>   getitem(name,flag)   Lookup a name in the namespace. If the value is
>callable and the flag is true, then the result
>of calling the value is returned, otherwise the
>value is returned. flag defaults to false.
>
>
> so "_.getitem(file, 1)" will probably do what you want.  But that's
> also basically the same as  -- did that not work for
> you?
>
Erm.. no, it's not.

In my experience with getitem, i've found that:

 

would be equivalent to:



not, as you said:



Note the quotes around file.  Your method says "render the object named in 
file."

The devil is in the details. (o8

Have a better one,
Curtis.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] "indirection" problem

2000-08-02 Thread David Coe

I *think* you've stumbled upon the way _.getitem behaves by default:


(from the DTML reference)

  getitem(name,flag)   Lookup a name in the namespace. If the value is
   callable and the flag is true, then the result
   of calling the value is returned, otherwise the
   value is returned. flag defaults to false.


so "_.getitem(file, 1)" will probably do what you want.  But that's
also basically the same as  -- did that not work for
you?


"Jacques Exelrud" <[EMAIL PROTECTED]> writes:

> I have in a dtml var the name of a dtml document I want to show as part
> of another document.
> 
> If I do a  (where file is the said variable)
> I get the content of that document show but now as html but as text, things
> like < have been translated to <
> 
> Any sugestions ?

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] "indirection" problem

2000-08-02 Thread Jacques Exelrud

I have in a dtml var the name of a dtml document I want to show as part
of another document.

If I do a  (where file is the said variable)
I get the content of that document show but now as html but as text, things
like < have been translated to <

Any sugestions ?

Thanks in advance,
Jacques



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )