getNextDialog

If your mode contains more than one dialog box, you must write the getNextDialog method in addition to the getFirstDialog method.

The previous dialog box is passed into the getNextDialog method so that you can determine where the user is in the sequence of dialog boxes and act accordingly. The getNextDialog method should return the next dialog box in the sequence, or it should return None to indicate that it has finished collecting input from the user. The following example is a modified version of the example in getFirstDialog that illustrates how inputs are collected from the user in a series of three dialog boxes rather than just one:

def getFirstDialog(self):

    self.dialog1 = PlateDB1(self)
    return self.dialog1

def getNextDialog(self, previousDb):

    if previousDb == self.dialog1:
        self.dialog2 = PlateDB2(self)
        return self.dialog2         
    elif previousDb == self.dialog2:
        self.dialog3 = PlateDB3(self)
        return self.dialog3
    else:
        return None