Oy... the mailer collapsed the helpful TABS in the original post, which showed the folder hierarchy. Thanks to all the helpful replies I had for my need for a "dynamic" <dtml-with>. "_.getitem(StringOfObject)" works beautifully. I have a similar additional newbie problem: FolderA ...FolderB ...FolderC ......FolderD ......Method1 Method1 (in FolderC) has no problem, of course, doing a <dtml-with FolderD> 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). Thanks for any help.
Roger Fisher writes:
FolderA ...FolderB ...FolderC ......FolderD ......Method1
Method1 (in FolderC) has no problem, of course, doing a <dtml-with FolderD>
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). Neither will it have a problem to do "<dtml-with FolderB>". (This is acquisition).
Dieter
Naturally, the first thing I tried was <dtml-with FolderB> which returned a KeyError on FolderB. -----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Friday, November 15, 2002 11:59 AM To: rlfisher@sprynet.com Cc: zope@zope.org Subject: Re: [Zope] Re: Trouble with dtml-with Roger Fisher writes:
FolderA ...FolderB ...FolderC ......FolderD ......Method1
Method1 (in FolderC) has no problem, of course, doing a <dtml-with FolderD>
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). Neither will it have a problem to do "<dtml-with FolderB>". (This is acquisition).
Dieter
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
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
participants (2)
-
Dieter Maurer -
Roger Fisher