Community
Participate
Working Groups
I add -Dorg.eclipse.rwt.enableUITests=true as VM argument to my launch configuration and run my RAP Application,When I close view,I get an error: Could not evaluate javascript response: Error: TypeError: w is undefined Script: var wm = org.eclipse.swt.WidgetManager.getInstance();wm.dispose( "w170" );wm.dispose( "w171" );wm.dispose( "w172" );wm.dispose( "w174" );wm.dispose( "w175" );wm.dispose( "remarks" );wm.dispose( "w179" );wm.dispose( "productVersion" );wm.dispose( "w176" );wm.dispose( "w177" );wm.dispose( "w173" );wm.dispose( "w181" );var req = org.eclipse.swt.Request.getInstance();req.setRequestCounter( "23" );var w = wm.findWidgetById( "w140" );w.setZIndex( 300 );w.setVisibility( true );var w = wm.findWidgetById( "w142" );w.setTabIndex( 30 );var w = wm.findWidgetById( "w146" );w.setTabIndex( 32 );var w = wm.findWidgetById( "w148" );w.setVisibility( true );var w = wm.findWidgetById( "code" );w.setTabIndex( 33 );var w = wm.findWidgetById( "w151" );w.setVisibility( true );var w = wm.findWidgetById( "name" );w.setTabIndex( 34 );var w = wm.findWidgetById( "remarks" );w.setTabIndex( 35 );var w = wm.findWidgetById( "w156" );w.setTabIndex( 37 );var w = wm.findWidgetById( "w157" );w.setTabIndex( 38 );var w = wm.findWidgetById( "w163" );w.setTabIndex( 39 );var w = wm.findWidgetById( "w164" );w.setTabIndex( 40 );var w = wm.findWidgetById( "w165" );w.setTabIndex( 41 );var w = wm.findWidgetById( "w125" );w.setZIndex( 299 );var w = wm.findWidgetById( "w87" );w.setZIndex( 298 );var w = wm.findWidgetById( "w166" );w.setSelected( true );var w = wm.findWidgetById( "w91" );w.setSpace( 201, 823, 1, 22 );var w = wm.findWidgetById( "w98" );w.setTabIndex( 42 ); message: w is undefined fileName: http://localhost:9090/rap?custom_service_handler=org.eclipse.rwt.internal.service.JSLibraryServiceHandler&hash=H1067473301 lineNumber: 50741 stack: @http://localhost:9090/rap?custom_service_handler=org.eclipse.rwt.internal.service.JSLibraryServiceHandler&hash=H1067473301:50741 name: TypeError Debug: on Request: org.eclipse.swt.events.ctabItemClosed=w181&w1.cursorLocation.x=634&w1.cursorLocation.y=85&uiRoot=w1&requestCounter=22
Open two or three editor view,when close this view,error occurred
I've tried to reproduce it with the Workbench Demo and -Dorg.eclipse.rwt.enableUITests=true in the launch configuration, but without success. Could you provide a snippet or steps to reproduce it with Workbench Demo?
kilin, any additional information/snippet on this?
Sorry ,I can not provide additional information,I think some problems in my code
From the stack trace I've extracted this snippet: .... var wm = org.eclipse.swt.WidgetManager.getInstance(); .... wm.dispose( "remarks" ); .... var w = wm.findWidgetById( "remarks" ); w.setTabIndex( 35 ); .... It shows that somehow you try to set the tabIndex on a widget with id "remarks" after you already dispose it. It's interesting to investigate it.
kilin, what kind of widget is this "remarks" - Shell, Composite? Is this id "remarks" static, or you dynamically assign it in runtime?
Or maybe you assign the same id "remarks" to more than one widget??!!
(In reply to comment #4) > Sorry ,I can not provide additional information,I think some problems in my code I will close this bug now, please reopen if you can provide a code snippet to reproduce the problem.