Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Unexpected return value from MessageBox.open()
Unexpected return value from MessageBox.open() [message #987778] Wed, 28 November 2012 02:09 Go to next message
Kevin Albrecht is currently offline Kevin Albrecht
Messages: 2
Registered: July 2009
Junior Member
Hi,

I have created a MessageBox with the following styles: ICON_WARNING, YES, NO, and CANCEL. When I show the MessageBox using the open() method, and then close it using the "X" in the corner of the message box, the return value is -4, instead of the expected YES, NO, or CANCEL. Which SWT constant does this correspond to, and why am I not getting one of the expected styles?

My platform is 64-bit GTK, running on Ubuntu 12.10.

Regards,
Kevin Albrecht

Re: Unexpected return value from MessageBox.open() [message #988436 is a reply to message #987778] Thu, 29 November 2012 16:35 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
That looks like a bug, it should be SWT.CLOSE. I've logged
https://bugs.eclipse.org/bugs/show_bug.cgi?id=395413 .

Grant


On 11/28/2012 10:56 AM, Kevin Albrecht wrote:
> Hi,
>
> I have created a MessageBox with the following styles: ICON_WARNING,
> YES, NO, and CANCEL. When I show the MessageBox using the open() method,
> and then close it using the "X" in the corner of the message box, the
> return value is -4, instead of the expected YES, NO, or CANCEL. Which
> SWT constant does this correspond to, and why am I not getting one of
> the expected styles?
>
> My platform is 64-bit GTK, running on Ubuntu 12.10.
>
> Regards,
> Kevin Albrecht
>
>
Previous Topic:Strike through Font?? is this possible in SWT
Next Topic:Remove Custom Contribution From Toolbar
Goto Forum:
  


Current Time: Sat Apr 19 08:49:22 EDT 2014

Powered by FUDForum. Page generated in 0.01579 seconds