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

Bug 336034

Summary: Strange behaviour with Listeners
Product: [RT] RAP Reporter: Timothy Arceri <t_arceri>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
StrageListenerBehaviour none

Description Timothy Arceri CLA 2011-02-02 00:52:04 EST
While testing code for a previous enhancement I came across the following code that works for SWT but behaves incorrectly on RAP.

The listener seem to be do stange things. Such as not being removed correctly. 

Steps to reproduce:

1. add new MultipleListenersExample().run(); to a plain implementation of IEntryPoint
2. Run and enter a number into either text box.
Comment 1 Timothy Arceri CLA 2011-02-02 00:52:51 EST
Created attachment 188114 [details]
StrageListenerBehaviour
Comment 2 Ivan Furnadjiev CLA 2011-02-02 05:59:19 EST
Are you aware of bug 327439 and bug 244008? In your snippet the modify listener is not notified at all as there is no modification - VerifyEvent event.doit is always false. I think that there is nothing wrong with the listeners and this bug is invalid.
Comment 3 Timothy Arceri CLA 2011-02-02 06:46:51 EST
This code was not written by me its off a SWT example website. An it DOES work on SWT. The RAP website states "We provide strict subsets of SWT, JFace and Workbench bundles. Thus, things should work just as they do in SWT and RCP" this is not true in this case, so this bug in not invalid. If you remove the verifyListener the code still does not execute correctly. You can only set the value once if my memory of the tests earlier today are correct.
Comment 4 Ivan Furnadjiev CLA 2011-02-02 08:16:39 EST
From what I read in the description, the bug is about "listeners are not removed correctly". Timothy, could you be more precise with "strange behavior with listeners" and "not execute correctly". Which version of RAP are you using? What is the correct behavior that you expect? Please define the problem with exact steps to reproduce it. Thanks.
Comment 5 Timothy Arceri CLA 2011-02-02 18:06:30 EST
After testing again it does appear to work fine once the VerifyListeners are removed. Please forgive me for the confusion.

*** This bug has been marked as a duplicate of bug 327439 ***