Okay I edit my question, try to explain it more clearly:
I have a Main Window with on button (addButton), If I click on it, it is show AddDialog with two buttons (ok_btn, cancel_btn), a label (errorLabel) and an entry. Please see the code:
Code link: http://pastebin.com/ketGWctN
Why print the message after AddDialog.run() if I click the btn_ok but the entry doesn’t filled?
Dialog.run()runs a loop until the dialog is closed or one of the buttons at the bottom is clicked. So when you click OK, the loop exits and theDialog.run()function returns.Try disabling the OK button if the entry is not filled.