[Zope-CMF] Re: Help needed - creating objects using a specified
path string or tuple
Paul Winkler
pw_lists at slinkp.com
Fri Feb 6 10:55:24 EST 2004
On Fri, Feb 06, 2004 at 05:11:39PM +0800, altkey wrote:
> >I'm not sure what you expected. Were you expecting the first
> >tuple of output to be like this?
> >
> >( 'desired path=/DF/A_Test_Folder',
> > 'supplied context=/DF/A_Test_Folder',
> > 'actual path=/DF/A_Test_Folder/01_project'),
> >
> >
>
> yes, that's what i hoped to see.
>
> >If so, then clearly something goes wrong the
> >very first time through.
> >So, what are the your arguments?
> >i.e. can you tell me the values of:
> >
> >self.getPhysicalPath()
> >objectList[0].getPhysicalPath()
> >
>
> '/'.join(self.getPhysicalPath()) = '/DF/A_Test_Folder'
that looks ok then.
> objectList[0] is just a list with 2 elements
> [some-meta-data, come-content-data]
right, I misunderstood what objectList consisted of.
So what's the PATH of the first element?
> PS:
>
> as an experiment i used manage_addFolder(name,<insert Dublic Core Title
> here>) and it placed the objects in the correct setting. I am feeling
> fairly unsure about the 'meaning' of invokeFactory now ...
It looks like it should do what you want.
grep reveals it to be in CMFCore/PortalFolder.py
around line 341 (as of cmf 1.4.2).
This is really puzzling, if manage_addFolder works then
I don't see why invokeFactory wouldn't either.
I think it's time for you to meet your new friend, the
interactive debugger :-)
http://zope.org/Members/klm/ZopeDebugging/FrontPage
--
Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE IRON LIGHTBULB!
(random hero from isometric.spaceninja.com)
More information about the Zope-CMF
mailing list