| Summary: | [Tree] Disposed treeitems still visible | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Benjamin Muskalla <b.muskalla> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | swimmer_86, tbuschto |
| Version: | 1.4 | ||
| Target Milestone: | 1.4 M1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 320597 | ||
Thanks Benny... (i guess...) Fixed in CVS HEAD. Hi, Tim. Could you provide a patch here? Yury. Hi. What version are you using exactly? This bug was fixed in 1.4M1, so you should be able to use 1.4.1 where its fixed. We use RAP 1.4. I just want to know the cause of this bug, because it seems to me that it is sometimes reproduced in IE9, but I can not find clear steps to reproduce it. Therefore I hope that understanding the cause will help me to figure the problem out. Yury. The Tree has been changed so much since this was fixed, its unlikely the issues are related. If you want to see what was changed i suppose you would have to check out the 1.4 branch from cvs and look up the history of Tree.js and TreeItem.js. (Its Revision 1.5 and 1.2 respectively.) |
When disposing and creating new TreeItems, it may happen that the disposed TreeItems are still visible. Snippet ------------------- Display display = new Display(); Shell shell = new Shell( display ); shell.setLayout( new GridLayout( 1, false ) ); final Tree tree = new Tree( shell, SWT.SINGLE | SWT.FULL_SELECTION ); tree.setLinesVisible( true ); tree.setHeaderVisible( true ); final TreeItem treeItem= new TreeItem(tree, SWT.NONE); treeItem.setText(0, "java.lang.Object"); TreeItem treeItem2= new TreeItem(treeItem, SWT.NONE); treeItem2.setText(0, "byte[]"); Button button = new Button( shell, SWT.PUSH ); button.setLayoutData( new GridData( SWT.BEGINNING, SWT.CENTER, false, false ) ); button.setText("replace contents"); button.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { tree.getItem( 0 ).dispose(); TreeItem treeItem3= new TreeItem(tree, SWT.NONE); treeItem3.setText(0, "java.lang.Object"); treeItem3.setExpanded( true ); TreeItem treeItem4= new TreeItem(treeItem3, SWT.NONE); treeItem4.setText(0, "byte[]"); } }); shell.pack(); shell.open(); while( !shell.isDisposed() ) { if( !display.readAndDispatch() ) display.sleep(); } display.dispose(); return 0;