Bug 106491 - [consistency] SWT.CHECK Table Selection events inconsistent
Summary: [consistency] SWT.CHECK Table Selection events inconsistent
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 11:00 EDT by Grant Gayed CLA
Modified: 2019-09-06 16:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2005-08-09 11:00:48 EDT
3.2M1

- run the snippet below
- use the mouse to check/uncheck the first item, note that one selection event 
is fired each time, which is fine
- now select the first item, and then check/uncheck it a few times
  -> note that two selection events are fired each time now
  -> this should still just be firing a single selection event with the CHECK 
detail

public static void main(String[] args) {
    Display display = new Display ();
    Shell shell = new Shell (display);
    shell.setBounds (10,10,200,200);
    Table table = new Table (shell, SWT.CHECK);
    table.setBounds (10,10,150,100);
    new TableItem (table, SWT.NONE).setText ("item");
    shell.open ();
    table.addListener(SWT.Selection, new Listener() {
        public void handleEvent (Event e) {
            System.out.println("selection: " + e.toString());
        }
    });
    while (!shell.isDisposed ()){
        if (!display.readAndDispatch ())display.sleep ();
    }
    display.dispose ();
}
Comment 1 Grant Gayed CLA 2006-03-31 15:19:31 EST
my mistake, motif seems to be the only platform that doesn't do this, changing title and OS fields accordingly
Comment 2 Grant Gayed CLA 2007-06-25 14:31:55 EDT
(3.3) Changing title and attaching updated snippet.  Having two items that are multi-selectable reveals more inconsistencies.

public static void main(String[] args) {
    Display display = new Display ();
    Shell shell = new Shell (display);
    shell.setBounds (10,10,200,200);
    Table table = new Table (shell, SWT.CHECK | SWT.MULTI);
    table.setBounds (10,10,150,100);
    new TableItem (table, SWT.NONE).setText ("item");
    new TableItem (table, SWT.NONE).setText ("item2");
    shell.open ();
    table.addListener(SWT.Selection, new Listener() {
        public void handleEvent (Event e) {
            System.out.println("selection: " + e.toString());
        }
    });
    while (!shell.isDisposed ()){
        if (!display.readAndDispatch ())display.sleep ();
    }
    display.dispose ();
}
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:10:35 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.