I am using an org.eclipse.ui.forms.FormDialog-derived class to query users of my RCP-Application for input. This is a modal dialog which is closed after the user clicked the OK-Button.
I have created member-variables for the Text-widgets and trying to get the user’s input with getText() after the user has clicked the OK-Button (and therefore has closed the dialog).
Unfortunately the widgets are disposed when the dialog closes (so, with clicking the OK-Button), and there is no way to call getText() on the Text-Widgets anymore.
I was wondering how others solve this use-case?
Simply extend
Dialog.okPressed()in your code to retrieve the current values before the dialogis closed…