gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/python/gump/document xdoc.py
Date Fri, 26 Mar 2004 05:30:57 GMT
ajack       2004/03/25 21:30:57

  Modified:    python/gump/document xdoc.py
  Log:
  Add unlink() to try to clean up & avoid circular links.
  
  Revision  Changes    Path
  1.19      +18 -4     gump/python/gump/document/xdoc.py
  
  Index: xdoc.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/xdoc.py,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- xdoc.py	12 Mar 2004 16:10:39 -0000	1.18
  +++ xdoc.py	26 Mar 2004 05:30:57 -0000	1.19
  @@ -234,6 +234,9 @@
           self.middle()
           self.callEnd()
           
  +        # Probably ought do this higher up
  +        self.unlink()
  +        
       def callStart(self,piece=None):
           if not piece: piece = self
           if hasattr(piece,'start') and callable(piece.start):
  @@ -276,6 +279,13 @@
           
       def isEmptyOk(self):
           return self.emptyOk
  +        
  +    def unlink(self):
  +        # Unlink subpieces...
  +        for subpiece in self.subpieces:
  +            subpiece.unlink()
  +        # Unlink oneself
  +        self.setOwner(None)
                   
   class XDocSection(XDocPiece):
       def __init__(self,context,title):
  @@ -671,7 +681,11 @@
           
       def middle(self):
           self.context.writeRaw(self.text)
  - 
  +        
  +    def unlink(self):
  +        XDocPiece.unlink(self)             
  +        self.text=None
  +        
   #       
   # Some raw xdocs (for when too lazy to create classes)
   #
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message