Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » MessageBox being displayed twice
MessageBox being displayed twice [message #1681128] Tue, 17 March 2015 07:23 Go to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
In our client application(s) we have a common core which defines the desktop, the specific applications then use a DesktopExtension. In MyDesktopExtension.desktopOpenedDelegate() we check for user permissions to decide which Outlines they are authorized to use. In the case where the user is not authorized for any outline we want to show him a message to explain why he is seeing an empty main window.

We are doing this using the following line of code:
MessageBox.showOkMessage(TEXTS.get("OC_FE_NO_PERMISSION_TITLE"), TEXTS.get("OC_ST_NO_PERMISSION_HEADER"), TEXTS.get("OC_ST_NO_PERMISSION_INFO"));


However, this leads to the message box being displayed twice, one on top of the other, the top one being modal, so there is no way to interact with the one drawn on the bottom (but if I move the top one, the bottom one is shown fully and it is a complete copy of the top one). If I click the OK button of the top popup, both of them disappear.

index.php/fa/21208/0/

If I step through desktopOpenDelegate() using the debugger, only one box is shown. If I place
Thread.sleep(100);

before the code shown above, I also only see one box.

Is this behaviour expected or have I discovered a bug?
Re: MessageBox being displayed twice [message #1694607 is a reply to message #1681128] Wed, 06 May 2015 15:39 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
I think I've solved our problem. Our desktopOpenDelegate() method looked as follows:

  @Override
  public ContributionCommand desktopOpenedDelegate() throws ProcessingException {
    performProductSpecificSettings();
    return super.desktopOpenedDelegate();
  }


Changing the above to

  @Override
  public ContributionCommand desktopOpenedDelegate() throws ProcessingException {
    ContributionCommand desktopOpenedDelegate = super.desktopOpenedDelegate();
    performProductSpecificSettings();
    return desktopOpenedDelegate;
  }


seems to solve this issue. Apparently the client is not yet ready for displaying MessageBoxes until super.desktopOpenDelegate() has been called.
Re: MessageBox being displayed twice [message #1694683 is a reply to message #1694607] Thu, 07 May 2015 06:56 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
It seems my post above was premature. I still occasionally get the message box twice, depending on which outline is displayed at startup.
Re: MessageBox being displayed twice [message #1698575 is a reply to message #1694683] Tue, 16 June 2015 13:30 Go to previous message
Eclipse UserFriend
I opened BUG 470275 for this issue.
Previous Topic:SWT Client: Checkbox no longer has focus indication
Next Topic:Exception when creating new Form
Goto Forum:
  


Current Time: Sat Apr 27 00:12:18 GMT 2024

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

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

Back to the top