Skip to main content


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 07:09 Go to next message
Kevin Albrecht is currently offline Kevin AlbrechtFriend
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 21:35 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
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: Fri Apr 19 21:43:29 GMT 2024

Powered by FUDForum. Page generated in 0.03392 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top