Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-20 Thread Roman Klesel
Chris Withers schrieb: for id in self.manage_targets.keys(): title = self.manage_targets[id]['name'] self.tgt_folder=Folder() This is dangerous... Why is that? self._setObject(id,self.tgt_folder)

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-20 Thread Sascha Welter
(Thu, Feb 16, 2006 at 12:00:05PM -0500) [EMAIL PROTECTED] wrote/schrieb/egrapse: From: Roman Klesel [EMAIL PROTECTED] Still I can't get what I want. when I now do: system.manage_addProduct['OFSP'].manage_addFile(fid, title='', file=cpu_load,

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-20 Thread Roman Klesel
Hello Sascha, Sascha Welter schrieb: manage_addFile (and some others like manage_addFolder, ...) work directly without xy.manage_addProduct[...]. That part is in the Zope book. The syntax with manage_addProduct[... is used for filesystem based products (like the stuff you have in your

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-20 Thread Sascha Welter
(Mon, Feb 20, 2006 at 03:45:31PM +0100) Roman Klesel wrote/schrieb/egrapse: Sascha Welter schrieb: manage_addFile (and some others like manage_addFolder, ...) work directly without xy.manage_addProduct[...]. That part is in the Zope book. The syntax with manage_addProduct[... is

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-20 Thread Chris Withers
Roman Klesel wrote: Chris Withers schrieb: for id in self.manage_targets.keys(): title = self.manage_targets[id]['name'] self.tgt_folder=Folder() This is dangerous... Why is that? 'cos arbitarilly assigning

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-17 Thread Chris Withers
Roman Klesel wrote: form OFS.Image import File - I build a class _File(File): I really doubt you need to do that... - pimped it up a little bit. What, specifically, did you add? - _setObject'ed it You shouldn't be calling that directly... Chris -- Simplistix - Content Management,

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-17 Thread Chris Withers
Roman Klesel wrote: for id in self.manage_targets.keys(): title = self.manage_targets[id]['name'] self.tgt_folder=Folder() This is dangerous...

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-16 Thread bruno desthuilliers
Roman Klesel wrote: Hello, Roman Klesel schrieb: Hello, in a product I try to make a file object persistent with the _setObject() method. What's wrong with: container.manage_addProduct['OFSP'].manage_addFile(id, file='', title='', precondition='', content_type='', REQUEST=None) --

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-16 Thread Jens Vagelpohl
On 16 Feb 2006, at 09:33, Roman Klesel wrote: Hello Bruno, bruno desthuilliers schrieb: What's wrong with: container.manage_addProduct['OFSP'].manage_addFile(id, file='', title='', precondition='', content_type='', REQUEST=None) Well, in a fs product I don't have container nor

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-16 Thread Roman Klesel
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

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-16 Thread Stefan H. Holek
Please learn to read and to provide the *complete* traceback. The error text alone is not enough most of the time. Your error *may* mean that 'system' is not yet wrapped. Are your positive that 'system' is a folder that already exists in the ZODB, i.e. has already been _setObject'ed?

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-16 Thread Roman Klesel
Hello, one more thing ... Roman Klesel schrieb: Your error *may* mean that 'system' is not yet wrapped. Are your positive that 'system' is a folder that already exists in the ZODB, i.e. has already been _setObject'ed? As far as I can tell: Yes! Actually I'm pretty shure, because as I

Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-16 Thread Roman Klesel
Hello again, I works! I just managed to get everything as I expected it to be. How I did it: form OFS.Image import File - I build a class _File(File): - pimped it up a little bit. - instatiated it - _setObject'ed it ... et voila I have nice File-objects with nice CMI interface... Thanks for