#NEWLINE# def _refresh_items( self ) : #NEWLINE# #INDENT# ' A private method which refreshes the conditional items.\n\n        This method destroys the old items and creates and initializes\n        the new items.\n\n        ' #NEWLINE# items = [ ] #NEWLINE# condition = self . condition #NEWLINE# cdata = self . _cdata #NEWLINE# if ( condition and ( len ( cdata ) > 0 ) ) : #NEWLINE# #INDENT# for ( node , f_locals ) in cdata : #NEWLINE# #INDENT# new_locals = f_locals . copy ( ) #NEWLINE# for child_node in new_locals . child_defs : #NEWLINE# #INDENT# child = child_node . typeclass ( ) #NEWLINE# child_node . populate ( child , child_node , new_locals ) #NEWLINE# items . append ( child ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for old in self . items : #NEWLINE# #INDENT# if ( not old . is_destroyed ) : #NEWLINE# #INDENT# old . destroy ( ) #NEWLINE# #UNINDENT# #UNINDENT# if ( len ( items ) > 0 ) : #NEWLINE# #INDENT# self . parent . insert_children ( self , items ) #NEWLINE# #UNINDENT# self . items = items