Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Prompting before closing Stopped working (Something weird in the Shell closing listener)
Prompting before closing Stopped working [message #1017116] Sat, 09 March 2013 08:47 Go to previous message
AppleJus Mising name is currently offline AppleJus Mising name
Messages: 46
Registered: July 2010
Member
Hi there,

Thank you for your kind help. I am experiencing a small and bizarre issue regarding prompting a user if he wants to close a shell or not, before it actually closes.

I am using a shell "SWT.Close" listener, in which I am using a "MessageDialog.openQuestion()" function with an if condition and a "event.doit = true"
if the user choose "YES" and a "event.doit = false" otherwise...
This code should prompt the user to choose whether to close the shell or not upon pressing the X button of the shell. What is happening now is that the shell is closing BEFORE the dialog shows... Regardless of the answer chosen the shell has already closed...

The same code used to work in much earlier versions of eclipse as I remember. Now I am using Eclipse 4.2 Juno (Version: 4.2.0 - Build id: I20120608-1400)

I tried to look how to solve this on my own, but I really ran out of ideas.
Can anyone help?

Thank you!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Injection and SWT
Next Topic:Strange behaviour with contributed Handler
Goto Forum:
  


Current Time: Fri May 24 13:05:54 EDT 2013

Powered by FUDForum. Page generated in 0.01878 seconds