[Zope-CMF] Creating hierarchical folders
Dieter Maurer
dieter@handshake.de
Thu, 5 Jun 2003 21:04:25 +0200
Chris Withers wrote at 2003-6-5 10:20 +0100:
> Dieter Maurer wrote:
> > You continue:
> >
> > newFolder= CMFSite.newFolder
> > newFolder.invokeFactory(type_name="...", id='newId')
> >
> > newWhatEver= newFolder.newId
>
> surely you mean:
>
> = newFolder[newId]
>
> ?
No.
"newId" is a constant in my example. Therefore, I can use
"attribute access" syntax.
Were "newId" a variable, I would use
newFolder.invokeFactory(type_name="...", id=newId)
newWhatEver= getattr(newFolder,newId)
Dieter