As initially discussed in RT-38347, currently Dialog.close() has the effect of closing the dialog immediately without regard for the result type. This means that in almost all cases the result type is null. This could seem counter-intuitive given how we treat dialogs with the X button and other keyboard shortcuts.
The question is what does Dialog.close() mean? Does it mean that we demand that the dialog be closed, and do not care for the result any longer, or does it mean that the dialog must go through the same process (with the same set of rules) as the X button. If it is the later, this means that the dialog may not always close when requested, as it becomes a function of the types and number of buttons that are in the dialog (briefly, the dialog will only close if there is one button, or if there are multiple buttons and at least one of the is a ButtonData.CANCEL button).
The question is what does Dialog.close() mean? Does it mean that we demand that the dialog be closed, and do not care for the result any longer, or does it mean that the dialog must go through the same process (with the same set of rules) as the X button. If it is the later, this means that the dialog may not always close when requested, as it becomes a function of the types and number of buttons that are in the dialog (briefly, the dialog will only close if there is one button, or if there are multiple buttons and at least one of the is a ButtonData.CANCEL button).