[Zope-CMF] how to get the object created by invokeFactory

seb bacon seb@jamkit.com
Tue, 3 Jul 2001 12:55:20 +0100


* Grégoire Weber <gregoire.weber@switzerland.org> [010703 12:04]:
> Hi all!
> context.invokeFactory('Topic', id)
> obj=######## how do I get the obj if the newly created topic with the id
> 'id'? 

This should work:

  obj = context[id]

Also, note that you can usually edit most of an object's attributes
when you instantiate it, using keyword args:

  context.invokeFactory('Topic', id, title='foo', description='bar')

However, Topic doesn't seem to let you do that.  One for the Tracker,
perhaps... 


seb