[Zope] Difference between manage_addProperty on a DTMLDocumen t and on a Folder

Benillouche, Michael Michael.Benillouche@france.acnielsen.com
Tue, 8 Feb 2000 10:25:50 +0100


Hi Tres,

Thanks for your answer,

I did what you say :

<dtml-call "REQUEST.set('compteur_login', _.str(compteur) )">
<dtml-call "manage_addDTMLDocument(id=compteur_login)">
<dtml-with compteur_login>
     <dtml-call "manage_addProperty('type', 'FC', 'string')">
  </dtml-with>

but only the document is created ; the property is NOT added .

It looks bizzare, Any other thoughts ?

Michael

-----Message d'origine-----
De: Tres Seaver [mailto:tseaver@palladion.com]
Date: lundi 7 février 2000 23:41
À: Benillouche, Michael
Cc: zope@zope.org
Objet: Re: [Zope] Difference between manage_addProperty on a
DTMLDocument and on a Folder


"Benillouche, Michael" <Michael.Benillouche@france.acnielsen.com>

> I have the following problem :
> 
> When I execute this code :
> 
> <dtml-call "REQUEST.set('compteur_login', _.str(compteur) )">
> <dtml-call "manage_addFolder(id=compteur_login)">
> <dtml-call "_[compteur_login].manage_addProperty('type', 'FC', 'string')">
> 
> The Folder  is created  with the property 'type'
> 
> But when I execute this code :
> 
> <dtml-call "REQUEST.set('compteur_login', _.str(compteur) )">
> <dtml-call "manage_addDTMLDocument(id=compteur_login)">
> <dtml-call "_[compteur_login].manage_addProperty('type', 'FC', 'string')">
> 
> I have the following error :
> 
> Error Type: AttributeError
> Error Value: 'string' object has no attribute 'manage_addProperty'
> 
> It seems that manage_addProperty doesn't behave the same way on a Folder
and
> a DTMLDocument .
> Any solution to make it work ?
> Thanks a lot.

The "_[compteur_login]" is causing the document to be rendered, I think.
Try::

  <dtml-with compteur_login>
     <dtml-call "manage_addProperty('type', 'FC', 'string')">
  </dtml-with>



-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com