def METHOD_NAME(self, event = None):
    if len(self.taskListBox.curselection()) > 0: # [gjeon] to avoid crash when nothing is selected
        index = int(self.taskListBox.curselection()[0])
        self.currentTask = self.__taskDict[index]
    else:
        self.currentTask = None