Hello,

Jens Vagelpohl schrieb:
> If that object  subclasses
> from the normal Zope Folder class (or is a Zope Folder)  you *will* have
> manage_addProduct.

Yes, actually you guys a right! self.manage_addProduct is available...
Hmmm ... wonder what made me think it's not ...

Still I can't get what I want.

when I now do:

system.manage_addProduct['OFSP'].manage_addFile(fid,
                        title='',
                        file=cpu_load,
                        content_type='text/plain',
                        precondition='')


I get:

AttributeError: _getProducts

So I poked around and rose an exception like this:

 raise KeyError, 'id: %s object: %s self: %s' % (id, system, self)
KeyError: 'id: gr_sys object: <Folder at > self: <Lasttest at lasttest55004>'

Where
 - id is the id of the folder where I want to create the file in.
 - object is the object reference of the same folder
 - and self ist ... self: a folderish object.

So there seems to be something wrong with "object". It's recognized that it is 
a folder but for some reason
it seems that it has no real object reference.

It is created like this:

self.tgt_folder[id]=Folder()
self._setObject(id,self.tgt_folder[id])

Of course I should create it with the managed_addProduct[ ... method, but it 
doesn't work. I again get:
AttributeError: _getProducts

I'm getting more and more confused ...

I mean the whole thing can't be totally wrong since everything worked exept 
for, that the objects that I wanted to
have where of type "SimpleItem" and not "File".

So there seems to be something wrong with by parent obejct ... But again this 
is also not possible since i can add
a File product manually with the ZMI ..


Any light s.o.?

Roman


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to