Example #1
0
    def __init__(self, parent, title):
        '''
        Instantiates the dialog box.

        @precondition: none.

        @postcondition: the dialog box is initialized and ready to
        use.

        @param parent: The parent window for this dialog box.

        @param title: The title of the window.
        '''
        DialogBox.__init__(self, parent, DialogBox.OK, title)
    def __init__(self, parent, group, title=None):
        '''
        Instantiates the dialog box.

        @precondition: none.

        @postcondition: the dialog box is initialized and ready to
        use.

        @param parent: The parent window for this dialog box.

        @param title: The title for this dialog box. Optional.
        '''

        # We put these first because the __init__ below is going to
        # use them.
        self._result = []
        self._group = group
        self.distance = group.default_distance
        self._distance_var = None

        DialogBox.__init__(self, parent, DialogBox.OK_CANCEL, title)