[Zope] Re: Trouble with dtml-with

Smith, Neil (Worcester) Neil.Smith@npower.com
Mon, 18 Nov 2002 09:23:13 -0000


A simple <dtml-with FolderB> should  find it.  The dtml-with uses aquisition
to find FolderB, so if you're in FolderC it doesn't find it there, but
descends into the folder below, and there it is.  This works for me, does it
not work for you?

--
Neil


-----Original Message-----
From: Roger Fisher [mailto:rlfisher@sprynet.com]
Sent: 16 November 2002 21:36
To: zope@zope.org
Subject: RE: [Zope] Re: Trouble with dtml-with


Sorry... I am not seeing this.  Method1 (which is contained in FolderC)
wishes to call Method2 which is in FolderB.  FolderB is adjacent to FolderC
(FolderC contains Method1).  In my previous coding that hasn't been on the
normal acquisition path:  Method1 can't "see" Method2 unless I bring FolderB
into the namespace.

Thanks for your patience with me.

-----Original Message-----
From: Dieter Maurer [mailto:dieter@handshake.de]
Sent: Saturday, November 16, 2002 11:51 AM
To: rlfisher@sprynet.com
Cc: zope@zope.org
Subject: RE: [Zope] Re: Trouble with dtml-with


Roger Fisher writes:
 > Naturally, the first thing I tried was <dtml-with FolderB> which returned
a
 > KeyError on FolderB.
 > ...
 >  > I cannot figure out how to <dtml-with> to get from Method1 (in
FolderC)
 > to
 >  > code in FolderB.  FolderB is parallel to Method1's parent (FolderC).
It is more important for what object you call "Method1" than
where is lives (the latter is usually irrelevant).

When you call "Method1" for an object in "FolderC", then it will find
"FolderB" (through acquisition).


Dieter


**********************************************************************
 
The information contained in this e-mail is confidential and intended only for the use of the addressee. If the reader of this message is not the addressee, you are hereby notified that you have received this e-mail in error and you must not copy, disseminate, distribute, use or take any action as a result of the information contained in it.
    
If you have received this e-mail in error, please notify postmaster@npower.com (UK 01384 275454) and delete it immediately from your system.
    
Neither Npower nor any of the other companies in the Innogy group from whom this e-mail originates accept any responsibility for losses or damage as a result of any viruses and it is your responsibility to check attachments (if any) for viruses.

Npower Limited
Registered office: Windmill Hill Business Park, Whitehill Way, Swindon SN5 6PB. Registered in England and Wales: number 3653277

This e-mail may be sent on behalf of a member of the Innogy group of companies.

**********************************************************************