-----Original Message-----
From: Jason Spisak <[EMAIL PROTECTED]>
To: Rik Hoekstra <[EMAIL PROTECTED]>
Cc: Kevin Dangoor <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: woensdag 7 juni 2000 22:26
Subject: Re: [Zope-dev] Recursively adding ZClasses (continued)


>Rik Hoekstra writes:
>
>> Thanks a lot Jason,
>>
>> I'll try it (though i'd swear I tried something very much alike)

It was very much alike, but you were right ;-).

The difference was that I did a

(sort of cut down pseudocode)

<dtml-with "manage_addProduct['ZECF']">
   <dtml-in obligatoryitems>
     <dtml-call "ZECItem_add(_['sequence-item'], REQUEST)">
   </dtml-in>
</dtml-with>


in which case the dtml-in interferes badly with the dtml-with

so turning it around to
<dtml-in obligatoryitems>
   <dtml-with "manage_addProduct['ZECF']">
     <dtml-call "ZECItem_add(_['sequence-item'], REQUEST)">
   </dtml-with>
</dtml-in>


which works.
So is this subtle or what ?! But at least it's consistent


>>
>> >
>> >This currently adds recursive ZClasses for me.  All ZClasses are on the
top
>> >level of the Product, no nesting:
>> >
>> >     <dtml-with "manage_addProduct['ZGL']">
>> >      <dtml-with
>> >"ComponentClass.createInObjectManager(_.getitem('unique_id', 1),
REQUEST)">
>>
>> hm, what is the 1 in the getitem argument doing there? Never used that
>> before...
>
>I am using it to render the document, not just get me the code.  The
>document is a DTMLMethod that renders a Zope install unique id based on the
>time.
>

Ah, yes. No need for that for me

>
>> >I cut a few things out that didn't have to do with the recursing, but
you
>> >bet the general picture.
>> >
>>
>>
>> Yes I bet it (sorry couldn't resist)
>>
>
>Yeah, like this is the most complex DTML you've ever seen.  ;)


Hm. You don't want me to send some of the clobbered stuff I put together
then. Still, I don't see how to do this in a cleaner way in a Python Method
(it will look cleaner, but the voodoo will be about the same unless I'm
badly mistaken).

Thanks (and Kevin also) for your help in sorting this out.

Rik


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

Reply via email to