def destroy(self): # first save the selected index before it is destroyed idx = self.get_current_index() # in PyRAF, assume they meant the first one if they clicked nothing, # since it is already active (underlined) if idx < 0: idx = 0 # get the object at that index if self.__clickedOK and idx >= 0: # otherwise is None self.__retval = self.__choices[idx] if self.__retval and type(self.__retval) == str: self.__retval = self.__retval.strip() # now destroy self.__lb = None Dialog.destroy(self)
def destroy(self): self.entry = None Dialog.destroy(self)
def destroy(self): self.optionMenu = None self.selected = None Dialog.destroy(self)