Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 416159

Summary: [WebClient][Scripting] Implement addListener/removeListener in all Scripting widgets
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan, tbuschto
Version: 2.2   
Target Milestone: 2.2 M2   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2013-08-29 11:01:35 EDT
Currently, the Composite Scripting proxy has addListener/removeListener methods, while none of the other widgets have one. It also lists "Resize" as an Event in the WebAPI Reference, which is only supported by using the addListener/removeListener on the client, but not by ClientListener on the server. ClientListener on the other supports most other event types, which are not supported when adding a listener on the client. Lastly, the addListener methods on Composite use strings to identify the type, while Scripting event handling usually uses the SWT constants (which are ints) to identify the type. 

This is all potentially confusing. 

We should merge/unify the ClientListener feature with the widget proxy add/removeListener implementation. Basically the addListener/removeListener methods should be moved to Control and support the same types as the ClientListner does. To be backwards compatible the SWT constants would likely have to be changed to strings on the client, or the addListener method must supports both string and int.
Comment 1 Tim Buschtoens CLA 2013-08-30 11:28:50 EDT
Fixed with commit ada7f027fa782e690bde1f820fe879925057048a.

Also, all Client side events are not documented with JsDoc.
Comment 2 Tim Buschtoens CLA 2013-09-02 04:24:15 EDT
(In reply to Tim Buschtoens from comment #1)
> Also, all Client side events are not documented with JsDoc.
not = now