Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335296 - [ToolTip] Visibility does not work as in SWT
Summary: [ToolTip] Visibility does not work as in SWT
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 06:23 EST by Tim Buschtoens CLA
Modified: 2011-01-25 11:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2011-01-25 06:23:55 EST
Run the follwing in SWT and RAP:
---
    public int createUI() {
      Display display = new Display();
      Shell shell = new Shell( display, SWT.TITLE | SWT.CLOSE );
      shell.setLayout( new GridLayout( 1, false ) );
      Button button = new Button( shell, SWT.PUSH );
      button.setText( "push" );
      final ToolTip tooltip = new ToolTip( shell, SWT.NONE );
      tooltip.setMessage( "foo" );
      tooltip.setText( "bar" );
      tooltip.setLocation( 200, 200 );
      button.addSelectionListener( new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          tooltip.setVisible( true );
        }
      } );
      shell.layout();
      shell.open();
      while (!shell.isDisposed()) {
          if (!display.readAndDispatch()) {
              display.sleep();
          }
      }
      return 0;
    }
---

SWT: ToolTip is not visible at first. Its shown when pushing the button, stays for a few seconds, then fades. Pushing the button again and the tooltip appears again.

RAP: ToolTip can be shortly seen fading out when the application starts. Its shown when pushing the button, stays for a few seconds, then fades, just like in SWT. Pushing the button again does nothing.

Not sure why pushing the button again doesnt work, might be a server-side issue. The animation at application start can probably be prevented by setting the default value of the client-property "visibility" to false. (An educated guess.)
Comment 1 Rüdiger Herrmann CLA 2011-01-25 08:34:55 EST
Thanks for the hint, Tim. You guessed right, setting the default visibility to false did it.
Changes are in HEAD
Comment 2 Tim Buschtoens CLA 2011-01-25 08:52:32 EST
I'm sorry, but it seems the push-button scenario described above still doesn't work. The tooltip can appear exactly once.

Also, you did not run the jsCompressor, so the changes were not visible in the non-debug variant.
Comment 3 Tim Buschtoens CLA 2011-01-25 08:53:00 EST
Reopend bug.
Comment 4 Rüdiger Herrmann CLA 2011-01-25 11:26:17 EST
I overlooked that there are two issues. Sorry for not geting this right in the first place.
It should work now. client.js is rebuilt, changes are in HEAD
Comment 5 Tim Buschtoens CLA 2011-01-25 11:46:05 EST
Works fine now.