def onActivate(self, e):

        # open/paint new word

        if registry.currentWord:
            if registry.rightMainPanel.bottomText.GetText():
                registry.currentWord.source_text = registry.rightMainPanel.bottomText.GetText()
            self.SetItemBackgroundColour(registry.currentWord.tree_node, ALPHA)
        registry.currentWord = self.GetItemPyData(e.GetItem())
        self.SetItemBackgroundColour(registry.currentWord.tree_node, LIGHT_BLUE)
        debug.header("New word selected: %s" % registry.currentWord.name)
        registry.rightMainPanel.paint()
 def __init__(self, packagePath=None, *args, **kwargs):
     debug.header('Application Started')
     self.packagePath = packagePath
     # init base class which calls self.OnInit()
     super(App, self).__init__(False, *args, **kwargs)