Returnvalue of manage_addProduct
Hello, I lilke to add some further properties to a newly created object. The object is created like this: new = container.manage_addProduct['ExtFile'].manage_addExtFile(id, \ id, desc, file) Now I wanted to add a further property using new.manage_addProperty(id, type, value) but I found out that new is 'None'. On the other hand I have seen in some examples that manage_addProduct does return the id of the new object. Any hint why it does not so when adding an 'ExtFile' object? What would be a clever method to obtain the new object quickly? Kind regards Andreas.
On Tue, Nov 19, 2002 at 09:43:05AM +0100, Andreas Tille wrote:
new = container.manage_addProduct['ExtFile'].manage_addExtFile(id, \ id, desc, file)
Now I wanted to add a further property using
new.manage_addProperty(id, type, value)
new = container[id] new.manage_addProperty(...) should work hth Jerome Alet
participants (2)
-
Andreas Tille -
Jerome Alet