[Zope] Setting a ZObject's title in its constructor
Rob Thorne
rob@torenware.com
Fri, 14 Feb 2003 17:49:29 -0800
Using 2.6.1, I'm trying to get the constructor of a ZClass to
dynamically assign the ID, and set the title from data passed to the
constructor. Setting the ID works fine; setting the title isn't
working at all.
From the constructor:
*# Create an ID dynamically
timestamp = "SHLH-%X" % int(context.ZopeTime())
request.set('id', timestamp)
request.set('title', 'My title')
#request.set('title', request.form['Sender_Name'])
instance = container.MyZClass.createInObjectManager(request['id'],
request)
*
Why does this work for 'id', but not for 'title'? Older code samples
using dtml seem to have set both attributes the same way.
Thanks,
Rob**
**
--
Rob Thorne
Torenware Networks