| Summary: | Field time not set by MouseEvent( Event ) ctor | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ralf Sternberg <rsternberg> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.4 | ||
| Target Milestone: | 1.4 M5 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Just a note... In RAP time field is a field in MouseEvent class, but in SWT it is a TypedEvent filed. Maybe we can consider to move this field in TypedEvent class like in SWT and fix the bug in TypedEvent ctor for all events like:
public TypedEvent(Event e) {
super(e.widget);
this.display = e.display;
this.widget = e.widget;
this.time = e.time;
this.data = e.data;
}
(In reply to comment #1) > Just a note... In RAP time field is a field in MouseEvent class, but in SWT it > is a TypedEvent filed. Maybe we can consider to move this field in TypedEvent > class like in SWT and fix the bug in TypedEvent ctor for all events like: Right, there's already a bug for this: bug 332976 Fixed in CVS HEAD. See MouseEvent ctor. |
Test snippet: Button button = new Button( shell, SWT.PUSH ); button.addMouseListener( new MouseAdapter() { public void mouseDown( MouseEvent event ) { assertEquals( 4711, event.time ); } } ); Event event = new Event(); event.time = 4711; button.notifyListeners( SWT.MouseDown, event );