Hi,

USE CASE
========
How to test if an "idFolder" exist in my "topFolder"?
If the "idFolder" does not exist I would like to add it to "topFolder"

Question
======
Who know why this code in an external method (EM) does not work?

Code
====
def addFolder(self, idFolder, topFolder):
   self=self.this()
   if not hasattr(topfolder,idFolder):
      self.getattr(self,topFolder).manage_addFolder(idFolder)


PS: How to add a folder anywhere in the ZODB tree with an EM also located
anywhere?

Bye, FR.

                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                         

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

Reply via email to