[Zope] Zclass manage_changeProperties
Casey Duncan
cduncan@kaivo.com
Mon, 18 Jun 2001 09:35:03 -0600
Sebal wrote:
>
> I want a method to change the 'auteur' property of my Zclass instance
> 'PDFclass'. The property sheet is PDFinfo and 'auteur' is a string field.
>
> This is an example of what can be the method :
> _______________________________________________
> <dtml-var standard_html_header>
> <dtml-call "REQUEST.set('numero_doc' , '7')">
> <dtml-in "Catalog({'numero_doc': _.str(numero_doc)})">
> <dtml-with getObject>
> <dtml-call
> "Control_Panel.Products.PDFclass.propertysheets.PDFinfo.manage_changeProperties({'auteur':
> 'nicolas'})">
> </dtml-with>
> </dtml-in>
> _______________________________________________
> and I get the following error :
> Error Type: AttributeError
> Error Value: PDFinfo
>
[snip]
You should be able to do this call inside the with to change the
property:
<dtml-call
expr="propertysheets.PDFinfo.manage_changeProperties(auteur='nicolas')">
Since getObject returns the instance and with puts in on top of the
namespace, you do not need to explicitly go through the Control_Panel.
Going through the ZClass is in fact not what you want because you want
to change an instance property not a class property.
>
> I really don't understand, I read the syntax from the [Zope-DEV]mailing list
> and it seems to be correct.
>
> thanx, sbaline
>
hth,
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>