コード例 #1
0
ファイル: listdlg.py プロジェクト: brechmos-stsci/stsci.tools
    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)
コード例 #2
0
ファイル: listdlg.py プロジェクト: saimn/stsci.tools
    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)
コード例 #3
0
 def destroy(self):
     self.entry = None
     Dialog.destroy(self)
コード例 #4
0
ファイル: dialogs.py プロジェクト: nfearnley/DigiMapGen
 def destroy(self):
     self.optionMenu = None
     self.selected = None
     Dialog.destroy(self)