|How can I prompt a question to user during a Job without losing the background thread? [message #735235]
||Tue, 11 October 2011 10:00
| John Ormerod
Registered: January 2010
I have a file import that can import multiple files, which I run in a Job. For each file I have to parse the header info in order to know its key, which I then look to see if it already exists in the database. If it does, I show a MessageDialog.openQuestion to ask the user if they want to overwrite or skip.
Whilst this works technically, the rest of the import runs on the UI thread, and I can't interact with the Job's Dialog.
I use Display.getDefault.syncExec() to display the question, as I need to halt the processing at this point.
I'm sure I noticed a similar case when installing a new Feature, looked the download was a Job, and at points it pops up a dialog to ask me questions.
Hope someone knows the answer
Powered by FUDForum
. Page generated in 0.01708 seconds