/[papo]/gnue/common/src/GObjects.py
ViewVC logotype

Diff of /gnue/common/src/GObjects.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by charlie, Tue Aug 27 18:15:51 2002 UTC revision 1.3.2.1 by styxman, Tue Jan 28 18:06:20 2003 UTC
# Line 83  class GObj(GTriggerCore): Line 83  class GObj(GTriggerCore):
83    #    #
84    # phaseInit    # phaseInit
85    #    #
86    def phaseInit(self, iterations=5):    def phaseInit(self, iterations=5, params={}):
87      for phase in range(iterations):      for phase in range(iterations):
88        self._phaseInit(phase)        self._phaseInit(phase, params)
89    
90    def _phaseInit(self,phase):    def _phaseInit(self,phase,params):
91      if (len(self._inits) > phase) and self._inits[phase]:      if (len(self._inits) > phase) and self._inits[phase]:
92        GDebug.printMesg(6,"%s: Init Phase %s" % (self._type, phase+1))        GDebug.printMesg(6,"%s: Init Phase %s" % (self._type, phase+1))
93        self._inits[phase]()        if self._type=='GFForm':
94            self._inits[phase](params)
95          else:
96            self._inits[phase]()
97    
98      for child in self._children:      for child in self._children:
99        if isinstance(child, GObj):        if isinstance(child, GObj):
100           child._phaseInit(phase)           child._phaseInit(phase,params)
101    
102    # This function is called after the parsers have completely    # This function is called after the parsers have completely
103    # constructed. All children should be in place and    # constructed. All children should be in place and

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.3.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26