def EntryChangedListener(self, tag, entry, add=True):
        year, month, day = entry.get_date()
        id = entry.get_id()
        wx.BeginBusyCursor()
        try:
            stack = self.GetTagStack(tag, year, month, day, id)
            tag_path = map(unicode, tag.split('/'))
            expected_stack_len = len(tag_path) + 2  # root + tag pieces + entry
            if add == False:
                if len(stack) == expected_stack_len:
                    self.Prune(stack[-1])
            else:
                newtag = None
                for i in range(len(tag_path)):
                    if i == 0:
                        newtag = tag_path[i]
                    else:
                        newtag = newtag + '/' + tag_path[i]
                    if len(stack) == i + 1:
                        data = wx.TreeItemData(TKEntryKey(None, None,
                                                         None, None,
                                                         newtag))
                        stack.append(self.AppendItem(stack[i], tag_path[i],
                                                     -1, -1, data))
                        self.SortChildren(stack[i])
                subject = entry.get_subject()
                if len(stack) == i + 2:
                    data = wx.TreeItemData(TKEntryKey(year, month, day,
                                                     id, newtag))
                    stack.append(self.AppendItem(stack[i + 1],
                                                 self._ItemLabel(day, month,
                                                                 year,
                                                                 subject),
                                                 -1, -1, data))
                    self.SortChildren(stack[i + 1])
                else:
                    self.SetItemText(stack[i + 2],
                                     self._ItemLabel(day, month, year,
                                                     subject))
        finally:
            wx.EndBusyCursor()


########################################################################
###
###  EVENT CALENDAR SUBCLASS
###
Test the creation of a simple XlsxWriter file.
dataset/ETHPy150Open cmpilato/thotkeeper/lib/tk_main.py/TKEventTagTree.EntryChangedListener--crossover with--dataset/ETHPy150Open jmcnamara/XlsxWriter/xlsxwriter/test/comparison/test_chart_pattern07.py/TestCompareXLSXFiles.test_create_file