Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336034 - Strange behaviour with Listeners
Summary: Strange behaviour with Listeners
Status: CLOSED DUPLICATE of bug 327439
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 00:52 EST by Timothy Arceri CLA
Modified: 2011-02-02 18:06 EST (History)
0 users

See Also:


Attachments
StrageListenerBehaviour (4.54 KB, text/x-java)
2011-02-02 00:52 EST, Timothy Arceri CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***