[Zope] question on setting PropertySheet value from External Method
Tim Lynch
lynch@gould.mannlib.cornell.edu
Fri, 14 Dec 2001 10:21:22 EST
Hi,
I'm having trouble setting a property of a ZClass propertysheet from
an external method. I can successfully create an instance of the ZClass and
from a DTML document set the properties, but I can't seem to get the syntax
right for doing it from the external method. Could someone give me some advice?
Here are the relevant lines from my external method that successfully creates the
ZClass instance:
recordID = "7893"
t = "A new title"
self.resources.manage_addProduct['agnicCatalog'].resourceClass.createInObjectManager(recordID, self.REQUEST)
I have a folder called 'resources' that I want to hold all instances of the class 'resourceClass'.
The above line works fine to create the instance.
But, when I try to change the Title property with:
self.resources[recordID].propertysheets['Basic'].manage_changeProperties(Title = t)
I get TypeError -- sequence index must be integer
I've tried a bunch of variations with recordID, but nothing seems to work.
Can someone set me straight? Thanks!
============================================================================
Tim Lynch tim.lynch@cornell.edu
Mann Library 607.255.9570
Cornell University
Ithaca, NY 14853