Jason Spisak writes:
 > Does anyonw know why this code won't create a folder within a folder. 
 > It's tells me the id is already in use, so that means it's not
 > descending into the newly created folder to make another folder.
 > 
 > def create(self):
 >     for digit in range(0, 10):
 >         folder    = self.manage_addFolder(str(digit), str(digit))
 >         subfolder = self.folder.manage_addFolder(str(digit), str(digit))
Apparently, the above line should add a new folder in (say) '00'.
What it does, however, is trying to add the new folder in the object named
'folder' (accessible from 'self'). This may well go wrong.

Keep in mind, that the local name space of the function 'create'
(where your variable 'folder' lives) is disjunct from the attribute
namespace of 'self' (where the attribute 'folder' lives).


Dieter

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to