[Modeling-cvs] ProjectModeling/Modeling EditingContext.py,1.32,1.33
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2004-05-22 10:51:20
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25709/Modeling Modified Files: EditingContext.py Log Message: isaChildOf(): explicitely returns false for self; faultForGlobalID(): parameter anEditingContext now defaults to self Index: EditingContext.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/EditingContext.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** EditingContext.py 16 Feb 2004 20:01:06 -0000 1.32 --- EditingContext.py 22 May 2004 10:51:09 -0000 1.33 *************** *** 1078,1084 **** def isaChildOf(self, anEditingContext): """ ! Tells whether the self is a child of the supplied EditingContext, either ! directly or indirectly """ try: currentEC=self --- 1078,1090 ---- def isaChildOf(self, anEditingContext): """ ! Tells whether ``self`` is a child of ``anEditingContext``, either directly ! (``anEditingContext`` is its parent) or indirectly (``anEditingContext`` ! is its grand-parent, or grand-grand-parent, etc.). ! ! Note that ``self`` is not a child of ``self``. """ + if anEditingContext==self: + return 0 + try: currentEC=self *************** *** 1090,1094 **** return 0 ! def faultForGlobalID(self, aGlobalID, anEditingContext): """ Searches for an object registered within the EditingContext with the --- 1096,1100 ---- return 0 ! def faultForGlobalID(self, aGlobalID, anEditingContext=None): """ Searches for an object registered within the EditingContext with the *************** *** 1098,1101 **** --- 1104,1110 ---- If anEditingContext is a child of self, """ + if anEditingContext is None: + anEditingContext=self + if anEditingContext.isaChildOf(self): # One of our child ECs forwarded the message |