Paolo Bizzarri wrote at 2004-8-10 09:44 +0200:
> ...
>from Products.TemporaryFolder.TemporaryFolder import constructTemporaryFolder
>def manage_addMyFolderCache(container, id, title='')
>       mfc = MyFolderCache(id, title)
>       container._setObject(id, mfc)

The standard way is:


When you follow the standard way, you avoid FMEs (Frequently Made Errors)
such as the above: "mfc" is not acquisition wrapped!

>def manage_addMyFolder(container, id, title='')
>       mf = MyFolder(id, title)
>       container._setObject(id, mf)
>       constructTemporaryFolder(mf, id='tmp', title='')
>       manage_addMyFolderCache(mf.tmp, id='cache', title='cache')
>The Problem
>The problems occur inside manage_addMyFolderCache, when it tries the 
>container._setObject. The error is always an AttributeError, because there is 
>no _setObject.
>After a brief look at the MountedTemporaryFolder class, I can understand that 
>there is still no folder inside mf.tmp, because the populate has not been 
>called yet.
>Now the questions:
>1)what is the problem which is occuring?

Did you extend the Zope configuration?
Such that you have a second temporary storage that can be mounted
at your place?

>2) how can I do what I want to do in a single transaction?

I fear you will need your own MountPoint logic that
does not depend an preconfigured storages in Zope's configuration

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to