Giter Site home page Giter Site logo

Comments (9)

bwolff avatar bwolff commented on July 18, 2024

Hi @ailiskovic,

it seems like the exception is coming from the Nebula Grid widget sources. Afaik, the RAP enabled version of the Nebula widget is merely a port from SWT to RWT. My guess would be that the same exception would occur when using the original SWT version of the Nebula Grid. It would therefore be an issue to be filed with the Nebula widget itself. The RAP ported version should not change the original behaviour, even if it may be considered as a bug.

Best regards,
Ben

from org.eclipse.rap.

ifurnadjiev avatar ifurnadjiev commented on July 18, 2024

Without investigating in details I tend to agree with @bwolff that if there is an issue, it comes from Nebula Grid original source code.

from org.eclipse.rap.

ifurnadjiev avatar ifurnadjiev commented on July 18, 2024

@ailiskovic please check your code against SWT (Nebula Grid) and let as know if the issue persists there too.

from org.eclipse.rap.

mheiss avatar mheiss commented on July 18, 2024

The issue is just reproducible in RAP. In SWT everything is working as expected. No exception is raised.

from org.eclipse.rap.

ifurnadjiev avatar ifurnadjiev commented on July 18, 2024

From the stack trace it seems that you are somehow navigate to a cell, which is not visible. Please list the exact steps to reproduce the issue.

from org.eclipse.rap.

ifurnadjiev avatar ifurnadjiev commented on July 18, 2024

BTW which RAP version are you using? I've tried to provoke the exception from the stack trace with your snippet without success with current RAP from main branch (RAP 3.23 M1).

from org.eclipse.rap.

mheiss avatar mheiss commented on July 18, 2024

Sorry i realized that our snippet is incomplete. Will clarify that with @ailiskovic and update the issue accordingly.
We are currently using RAP 3.21.0

from org.eclipse.rap.

ailiskovic avatar ailiskovic commented on July 18, 2024

Sorry for misunderstanding. This is the code sample:

    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());

    Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    grid.setCellSelectionEnabled(true);
    grid.setHeaderVisible(true);

    grid.addListener(SWT.KeyDown, e -> {
        System.out.println(e.character);
    });

    GridColumn column = new GridColumn(grid, SWT.NONE);
    column.setText("Column 1");
    column.setWidth(100);
    GridColumn column2 = new GridColumn(grid, SWT.NONE);
    column2.setText("Column 2");
    column2.setWidth(100);
    GridColumn column3 = new GridColumn(grid, SWT.NONE);
    column3.setText("Column 3");
    column3.setWidth(100);
    column3.setVisible(false);

    GridItem item1 = new GridItem(grid, SWT.NONE);
    item1.setText(2, "Item");
    GridItem item2 = new GridItem(grid, SWT.NONE);
    item2.setText(1, "Item2");
    GridItem item3 = new GridItem(grid, SWT.NONE);
    item3.setText(2, "Item3");

    shell.setSize(500, 500);
    shell.open();

    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) {
            display.sleep();
        }
    }
    display.dispose();`

The problem is, if I navigate to the cell, which is not visible, the error occurs. This happens if one uses a listener for pressing a key on the keyboard (in the example a simple print of a key).

Steps to reproduce the error:

  • navigate to the second column and set focus on one of the cells
  • press right arrow on the keyboard

In SWT everything works as expected, one only gets an error with RAP.

In addition I have uploaded a new stacktrace

stacktrace2.txt

from org.eclipse.rap.

ifurnadjiev avatar ifurnadjiev commented on July 18, 2024

Thanks for the snippet. I can reproduce it now.

from org.eclipse.rap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.