Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Problem with shell closing after the grid drag detection mechanism being enabled and some grid colum
Problem with shell closing after the grid drag detection mechanism being enabled and some grid colum [message #46696] Wed, 16 January 2008 14:17 Go to next message
Eclipse UserFriend
Originally posted by: vye.maconomy.dk

Hi guys,

I faced the following problem: when I enable drag detection mechanism in
the grid and then click on some grid column header, then I cannot close
immediately the grid's shell: the first mouse click after click on the
header activates the shell, and only the second click on the
application's close button closes the application. This happens under
Windows platform. Here is the snippet for this problem (actually this is
GridSnippet1, modificated for drag detection support of the grid):

package snippets;

import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DragDetectEvent;
import org.eclipse.swt.events.DragDetectListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

/**
* Creates a simple grid and a button for focusing and selection of
* the first cell of the grid. */
public class Snippet001GridDragDetectListener {

/**
* Main entry.
* @param args command line arguments
*/
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());

final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL |
SWT.H_SCROLL);
grid.setHeaderVisible(true);
final GridColumn column = new GridColumn(grid, SWT.NONE);
column.setTree(true);
column.setText("Column 1");
column.setWidth(100);
final GridItem item1 = new GridItem(grid, SWT.NONE);
item1.setText("Root Item");
final GridItem item2 = new GridItem(item1, SWT.NONE);
item2.setText("Second item");
final GridItem item3 = new GridItem(item2, SWT.NONE);
item3.setText("Third Item");

// The following code was inserted to enable
// drag detection listening mechanism
// in the grid.
grid.setDragDetect(true);
// If you add at least one drag detection listener
// to the grid and then click on the grid column
// header, then the grid's shell loses its active state,
// that is, for example, you cannot then close the
// demo with one mouse click (first mouse
// click afterwards activates the grid's shell, and
// only second mouse click closes the demo itself).
grid.addDragDetectListener(new DragDetectListener() {
/** {@inheritDoc} */
public void dragDetected(final DragDetectEvent event) { }
});

shell.setSize(200, 200);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}

Does somebody know why it might be the case?

Best regards,

Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #46777 is a reply to message #46696] Thu, 17 January 2008 15:06 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
Hi Vadym,

This was a bug. I've fixed it. Please download a new build and verify
that it works.

Regards,
-Chris

Vadym Yepishov wrote:
> Hi guys,
>
> I faced the following problem: when I enable drag detection mechanism in
> the grid and then click on some grid column header, then I cannot close
> immediately the grid's shell: the first mouse click after click on the
> header activates the shell, and only the second click on the
> application's close button closes the application. This happens under
> Windows platform. Here is the snippet for this problem (actually this is
> GridSnippet1, modificated for drag detection support of the grid):
>
> package snippets;
>
> import org.eclipse.nebula.widgets.grid.Grid;
> import org.eclipse.nebula.widgets.grid.GridColumn;
> import org.eclipse.nebula.widgets.grid.GridItem;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.events.DragDetectEvent;
> import org.eclipse.swt.events.DragDetectListener;
> import org.eclipse.swt.layout.FillLayout;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
>
> /**
> * Creates a simple grid and a button for focusing and selection of
> * the first cell of the grid. */
> public class Snippet001GridDragDetectListener {
>
> /**
> * Main entry.
> * @param args command line arguments
> */
> public static void main(String[] args) {
> final Display display = new Display();
> final Shell shell = new Shell(display);
> shell.setLayout(new FillLayout());
>
> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL |
> SWT.H_SCROLL);
> grid.setHeaderVisible(true);
> final GridColumn column = new GridColumn(grid, SWT.NONE);
> column.setTree(true);
> column.setText("Column 1");
> column.setWidth(100);
> final GridItem item1 = new GridItem(grid, SWT.NONE);
> item1.setText("Root Item");
> final GridItem item2 = new GridItem(item1, SWT.NONE);
> item2.setText("Second item");
> final GridItem item3 = new GridItem(item2, SWT.NONE);
> item3.setText("Third Item");
>
> // The following code was inserted to enable
> // drag detection listening mechanism
> // in the grid.
> grid.setDragDetect(true);
> // If you add at least one drag detection listener
> // to the grid and then click on the grid column
> // header, then the grid's shell loses its active state,
> // that is, for example, you cannot then close the
> // demo with one mouse click (first mouse
> // click afterwards activates the grid's shell, and
> // only second mouse click closes the demo itself).
> grid.addDragDetectListener(new DragDetectListener() {
> /** {@inheritDoc} */
> public void dragDetected(final DragDetectEvent event) { }
> });
>
> shell.setSize(200, 200);
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
> }
>
> Does somebody know why it might be the case?
>
> Best regards,
>
> Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #47044 is a reply to message #46777] Fri, 18 January 2008 09:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vye.maconomy.dk

Hi Chris,

Unfortunately the bug can still be reproduced under the new build.
Please use the snippet described in my letter and do the following steps:
1) open the demo;
2) click on the grid column header;
3) click on the "close" button of the demo.
Actual result: the demo is not closed (the "close" button just becomes
active).
Expected result: the demo should be closed.

Hope you will find the source of the problem:)

Best regards,
Vadym Yepishov

Chris Gross wrote:
> Hi Vadym,
>
> This was a bug. I've fixed it. Please download a new build and verify
> that it works.
>
> Regards,
> -Chris
>
> Vadym Yepishov wrote:
>> Hi guys,
>>
>> I faced the following problem: when I enable drag detection mechanism
>> in the grid and then click on some grid column header, then I cannot
>> close immediately the grid's shell: the first mouse click after click
>> on the header activates the shell, and only the second click on the
>> application's close button closes the application. This happens under
>> Windows platform. Here is the snippet for this problem (actually this
>> is GridSnippet1, modificated for drag detection support of the grid):
>>
>> package snippets;
>>
>> import org.eclipse.nebula.widgets.grid.Grid;
>> import org.eclipse.nebula.widgets.grid.GridColumn;
>> import org.eclipse.nebula.widgets.grid.GridItem;
>> import org.eclipse.swt.SWT;
>> import org.eclipse.swt.events.DragDetectEvent;
>> import org.eclipse.swt.events.DragDetectListener;
>> import org.eclipse.swt.layout.FillLayout;
>> import org.eclipse.swt.widgets.Display;
>> import org.eclipse.swt.widgets.Shell;
>>
>> /**
>> * Creates a simple grid and a button for focusing and selection of
>> * the first cell of the grid. */
>> public class Snippet001GridDragDetectListener {
>>
>> /**
>> * Main entry.
>> * @param args command line arguments
>> */
>> public static void main(String[] args) {
>> final Display display = new Display();
>> final Shell shell = new Shell(display);
>> shell.setLayout(new FillLayout());
>>
>> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL |
>> SWT.H_SCROLL);
>> grid.setHeaderVisible(true);
>> final GridColumn column = new GridColumn(grid, SWT.NONE);
>> column.setTree(true);
>> column.setText("Column 1");
>> column.setWidth(100);
>> final GridItem item1 = new GridItem(grid, SWT.NONE);
>> item1.setText("Root Item");
>> final GridItem item2 = new GridItem(item1, SWT.NONE);
>> item2.setText("Second item");
>> final GridItem item3 = new GridItem(item2, SWT.NONE);
>> item3.setText("Third Item");
>> // The following code was inserted to enable
>> // drag detection listening mechanism
>> // in the grid.
>> grid.setDragDetect(true);
>> // If you add at least one drag detection listener
>> // to the grid and then click on the grid column
>> // header, then the grid's shell loses its active state,
>> // that is, for example, you cannot then close the
>> // demo with one mouse click (first mouse
>> // click afterwards activates the grid's shell, and
>> // only second mouse click closes the demo itself).
>> grid.addDragDetectListener(new DragDetectListener() {
>> /** {@inheritDoc} */
>> public void dragDetected(final DragDetectEvent event) { }
>> });
>>
>> shell.setSize(200, 200);
>> shell.open();
>> while (!shell.isDisposed()) {
>> if (!display.readAndDispatch())
>> display.sleep();
>> }
>> display.dispose();
>> }
>> }
>>
>> Does somebody know why it might be the case?
>>
>> Best regards,
>>
>> Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #47560 is a reply to message #47044] Sun, 27 January 2008 14:54 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
I can't reproduce this again. Are you sure you downloaded the new
build? Could you try downloading a new build again?

Regards,
-Chris

Vadym Yepishov wrote:
> Hi Chris,
>
> Unfortunately the bug can still be reproduced under the new build.
> Please use the snippet described in my letter and do the following steps:
> 1) open the demo;
> 2) click on the grid column header;
> 3) click on the "close" button of the demo.
> Actual result: the demo is not closed (the "close" button just becomes
> active).
> Expected result: the demo should be closed.
>
> Hope you will find the source of the problem:)
>
> Best regards,
> Vadym Yepishov
>
> Chris Gross wrote:
>> Hi Vadym,
>>
>> This was a bug. I've fixed it. Please download a new build and
>> verify that it works.
>>
>> Regards,
>> -Chris
>>
>> Vadym Yepishov wrote:
>>> Hi guys,
>>>
>>> I faced the following problem: when I enable drag detection mechanism
>>> in the grid and then click on some grid column header, then I cannot
>>> close immediately the grid's shell: the first mouse click after click
>>> on the header activates the shell, and only the second click on the
>>> application's close button closes the application. This happens under
>>> Windows platform. Here is the snippet for this problem (actually this
>>> is GridSnippet1, modificated for drag detection support of the grid):
>>>
>>> package snippets;
>>>
>>> import org.eclipse.nebula.widgets.grid.Grid;
>>> import org.eclipse.nebula.widgets.grid.GridColumn;
>>> import org.eclipse.nebula.widgets.grid.GridItem;
>>> import org.eclipse.swt.SWT;
>>> import org.eclipse.swt.events.DragDetectEvent;
>>> import org.eclipse.swt.events.DragDetectListener;
>>> import org.eclipse.swt.layout.FillLayout;
>>> import org.eclipse.swt.widgets.Display;
>>> import org.eclipse.swt.widgets.Shell;
>>>
>>> /**
>>> * Creates a simple grid and a button for focusing and selection of
>>> * the first cell of the grid. */
>>> public class Snippet001GridDragDetectListener {
>>>
>>> /**
>>> * Main entry.
>>> * @param args command line arguments
>>> */
>>> public static void main(String[] args) {
>>> final Display display = new Display();
>>> final Shell shell = new Shell(display);
>>> shell.setLayout(new FillLayout());
>>>
>>> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL |
>>> SWT.H_SCROLL);
>>> grid.setHeaderVisible(true);
>>> final GridColumn column = new GridColumn(grid, SWT.NONE);
>>> column.setTree(true);
>>> column.setText("Column 1");
>>> column.setWidth(100);
>>> final GridItem item1 = new GridItem(grid, SWT.NONE);
>>> item1.setText("Root Item");
>>> final GridItem item2 = new GridItem(item1, SWT.NONE);
>>> item2.setText("Second item");
>>> final GridItem item3 = new GridItem(item2, SWT.NONE);
>>> item3.setText("Third Item");
>>> // The following code was inserted to enable
>>> // drag detection listening mechanism
>>> // in the grid.
>>> grid.setDragDetect(true);
>>> // If you add at least one drag detection listener
>>> // to the grid and then click on the grid column
>>> // header, then the grid's shell loses its active state,
>>> // that is, for example, you cannot then close the
>>> // demo with one mouse click (first mouse
>>> // click afterwards activates the grid's shell, and
>>> // only second mouse click closes the demo itself).
>>> grid.addDragDetectListener(new DragDetectListener() {
>>> /** {@inheritDoc} */
>>> public void dragDetected(final DragDetectEvent event) { }
>>> });
>>>
>>> shell.setSize(200, 200);
>>> shell.open();
>>> while (!shell.isDisposed()) {
>>> if (!display.readAndDispatch())
>>> display.sleep();
>>> }
>>> display.dispose();
>>> }
>>> }
>>>
>>> Does somebody know why it might be the case?
>>>
>>> Best regards,
>>>
>>> Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #47817 is a reply to message #47560] Mon, 28 January 2008 12:06 Go to previous message
Eclipse UserFriend
Originally posted by: vye.maconomy.dk

Hi Chris,

Thanks for your help. The defect is fixed now.

Regards,
Vadym

Chris Gross wrote:
> I can't reproduce this again. Are you sure you downloaded the new
> build? Could you try downloading a new build again?
>
> Regards,
> -Chris
>
> Vadym Yepishov wrote:
>> Hi Chris,
>>
>> Unfortunately the bug can still be reproduced under the new build.
>> Please use the snippet described in my letter and do the following steps:
>> 1) open the demo;
>> 2) click on the grid column header;
>> 3) click on the "close" button of the demo.
>> Actual result: the demo is not closed (the "close" button just becomes
>> active).
>> Expected result: the demo should be closed.
>>
>> Hope you will find the source of the problem:)
>>
>> Best regards,
>> Vadym Yepishov
>>
>> Chris Gross wrote:
>>> Hi Vadym,
>>>
>>> This was a bug. I've fixed it. Please download a new build and
>>> verify that it works.
>>>
>>> Regards,
>>> -Chris
>>>
>>> Vadym Yepishov wrote:
>>>> Hi guys,
>>>>
>>>> I faced the following problem: when I enable drag detection
>>>> mechanism in the grid and then click on some grid column header,
>>>> then I cannot close immediately the grid's shell: the first mouse
>>>> click after click on the header activates the shell, and only the
>>>> second click on the application's close button closes the
>>>> application. This happens under Windows platform. Here is the
>>>> snippet for this problem (actually this is GridSnippet1, modificated
>>>> for drag detection support of the grid):
>>>>
>>>> package snippets;
>>>>
>>>> import org.eclipse.nebula.widgets.grid.Grid;
>>>> import org.eclipse.nebula.widgets.grid.GridColumn;
>>>> import org.eclipse.nebula.widgets.grid.GridItem;
>>>> import org.eclipse.swt.SWT;
>>>> import org.eclipse.swt.events.DragDetectEvent;
>>>> import org.eclipse.swt.events.DragDetectListener;
>>>> import org.eclipse.swt.layout.FillLayout;
>>>> import org.eclipse.swt.widgets.Display;
>>>> import org.eclipse.swt.widgets.Shell;
>>>>
>>>> /**
>>>> * Creates a simple grid and a button for focusing and selection of
>>>> * the first cell of the grid. */
>>>> public class Snippet001GridDragDetectListener {
>>>>
>>>> /**
>>>> * Main entry.
>>>> * @param args command line arguments
>>>> */
>>>> public static void main(String[] args) {
>>>> final Display display = new Display();
>>>> final Shell shell = new Shell(display);
>>>> shell.setLayout(new FillLayout());
>>>>
>>>> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL
>>>> | SWT.H_SCROLL);
>>>> grid.setHeaderVisible(true);
>>>> final GridColumn column = new GridColumn(grid, SWT.NONE);
>>>> column.setTree(true);
>>>> column.setText("Column 1");
>>>> column.setWidth(100);
>>>> final GridItem item1 = new GridItem(grid, SWT.NONE);
>>>> item1.setText("Root Item");
>>>> final GridItem item2 = new GridItem(item1, SWT.NONE);
>>>> item2.setText("Second item");
>>>> final GridItem item3 = new GridItem(item2, SWT.NONE);
>>>> item3.setText("Third Item");
>>>> // The following code was inserted to enable
>>>> // drag detection listening mechanism
>>>> // in the grid.
>>>> grid.setDragDetect(true);
>>>> // If you add at least one drag detection listener
>>>> // to the grid and then click on the grid column
>>>> // header, then the grid's shell loses its active state,
>>>> // that is, for example, you cannot then close the
>>>> // demo with one mouse click (first mouse
>>>> // click afterwards activates the grid's shell, and
>>>> // only second mouse click closes the demo itself).
>>>> grid.addDragDetectListener(new DragDetectListener() {
>>>> /** {@inheritDoc} */
>>>> public void dragDetected(final DragDetectEvent event) { }
>>>> });
>>>>
>>>> shell.setSize(200, 200);
>>>> shell.open();
>>>> while (!shell.isDisposed()) {
>>>> if (!display.readAndDispatch())
>>>> display.sleep();
>>>> }
>>>> display.dispose();
>>>> }
>>>> }
>>>>
>>>> Does somebody know why it might be the case?
>>>>
>>>> Best regards,
>>>>
>>>> Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #587745 is a reply to message #46696] Thu, 17 January 2008 15:06 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Hi Vadym,

This was a bug. I've fixed it. Please download a new build and verify
that it works.

Regards,
-Chris

Vadym Yepishov wrote:
> Hi guys,
>
> I faced the following problem: when I enable drag detection mechanism in
> the grid and then click on some grid column header, then I cannot close
> immediately the grid's shell: the first mouse click after click on the
> header activates the shell, and only the second click on the
> application's close button closes the application. This happens under
> Windows platform. Here is the snippet for this problem (actually this is
> GridSnippet1, modificated for drag detection support of the grid):
>
> package snippets;
>
> import org.eclipse.nebula.widgets.grid.Grid;
> import org.eclipse.nebula.widgets.grid.GridColumn;
> import org.eclipse.nebula.widgets.grid.GridItem;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.events.DragDetectEvent;
> import org.eclipse.swt.events.DragDetectListener;
> import org.eclipse.swt.layout.FillLayout;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
>
> /**
> * Creates a simple grid and a button for focusing and selection of
> * the first cell of the grid. */
> public class Snippet001GridDragDetectListener {
>
> /**
> * Main entry.
> * @param args command line arguments
> */
> public static void main(String[] args) {
> final Display display = new Display();
> final Shell shell = new Shell(display);
> shell.setLayout(new FillLayout());
>
> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL |
> SWT.H_SCROLL);
> grid.setHeaderVisible(true);
> final GridColumn column = new GridColumn(grid, SWT.NONE);
> column.setTree(true);
> column.setText("Column 1");
> column.setWidth(100);
> final GridItem item1 = new GridItem(grid, SWT.NONE);
> item1.setText("Root Item");
> final GridItem item2 = new GridItem(item1, SWT.NONE);
> item2.setText("Second item");
> final GridItem item3 = new GridItem(item2, SWT.NONE);
> item3.setText("Third Item");
>
> // The following code was inserted to enable
> // drag detection listening mechanism
> // in the grid.
> grid.setDragDetect(true);
> // If you add at least one drag detection listener
> // to the grid and then click on the grid column
> // header, then the grid's shell loses its active state,
> // that is, for example, you cannot then close the
> // demo with one mouse click (first mouse
> // click afterwards activates the grid's shell, and
> // only second mouse click closes the demo itself).
> grid.addDragDetectListener(new DragDetectListener() {
> /** {@inheritDoc} */
> public void dragDetected(final DragDetectEvent event) { }
> });
>
> shell.setSize(200, 200);
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
> }
>
> Does somebody know why it might be the case?
>
> Best regards,
>
> Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #587826 is a reply to message #46777] Fri, 18 January 2008 09:38 Go to previous message
Eclipse UserFriend
Originally posted by: vye.maconomy.dk

Hi Chris,

Unfortunately the bug can still be reproduced under the new build.
Please use the snippet described in my letter and do the following steps:
1) open the demo;
2) click on the grid column header;
3) click on the "close" button of the demo.
Actual result: the demo is not closed (the "close" button just becomes
active).
Expected result: the demo should be closed.

Hope you will find the source of the problem:)

Best regards,
Vadym Yepishov

Chris Gross wrote:
> Hi Vadym,
>
> This was a bug. I've fixed it. Please download a new build and verify
> that it works.
>
> Regards,
> -Chris
>
> Vadym Yepishov wrote:
>> Hi guys,
>>
>> I faced the following problem: when I enable drag detection mechanism
>> in the grid and then click on some grid column header, then I cannot
>> close immediately the grid's shell: the first mouse click after click
>> on the header activates the shell, and only the second click on the
>> application's close button closes the application. This happens under
>> Windows platform. Here is the snippet for this problem (actually this
>> is GridSnippet1, modificated for drag detection support of the grid):
>>
>> package snippets;
>>
>> import org.eclipse.nebula.widgets.grid.Grid;
>> import org.eclipse.nebula.widgets.grid.GridColumn;
>> import org.eclipse.nebula.widgets.grid.GridItem;
>> import org.eclipse.swt.SWT;
>> import org.eclipse.swt.events.DragDetectEvent;
>> import org.eclipse.swt.events.DragDetectListener;
>> import org.eclipse.swt.layout.FillLayout;
>> import org.eclipse.swt.widgets.Display;
>> import org.eclipse.swt.widgets.Shell;
>>
>> /**
>> * Creates a simple grid and a button for focusing and selection of
>> * the first cell of the grid. */
>> public class Snippet001GridDragDetectListener {
>>
>> /**
>> * Main entry.
>> * @param args command line arguments
>> */
>> public static void main(String[] args) {
>> final Display display = new Display();
>> final Shell shell = new Shell(display);
>> shell.setLayout(new FillLayout());
>>
>> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL |
>> SWT.H_SCROLL);
>> grid.setHeaderVisible(true);
>> final GridColumn column = new GridColumn(grid, SWT.NONE);
>> column.setTree(true);
>> column.setText("Column 1");
>> column.setWidth(100);
>> final GridItem item1 = new GridItem(grid, SWT.NONE);
>> item1.setText("Root Item");
>> final GridItem item2 = new GridItem(item1, SWT.NONE);
>> item2.setText("Second item");
>> final GridItem item3 = new GridItem(item2, SWT.NONE);
>> item3.setText("Third Item");
>> // The following code was inserted to enable
>> // drag detection listening mechanism
>> // in the grid.
>> grid.setDragDetect(true);
>> // If you add at least one drag detection listener
>> // to the grid and then click on the grid column
>> // header, then the grid's shell loses its active state,
>> // that is, for example, you cannot then close the
>> // demo with one mouse click (first mouse
>> // click afterwards activates the grid's shell, and
>> // only second mouse click closes the demo itself).
>> grid.addDragDetectListener(new DragDetectListener() {
>> /** {@inheritDoc} */
>> public void dragDetected(final DragDetectEvent event) { }
>> });
>>
>> shell.setSize(200, 200);
>> shell.open();
>> while (!shell.isDisposed()) {
>> if (!display.readAndDispatch())
>> display.sleep();
>> }
>> display.dispose();
>> }
>> }
>>
>> Does somebody know why it might be the case?
>>
>> Best regards,
>>
>> Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #587979 is a reply to message #47044] Sun, 27 January 2008 14:54 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
I can't reproduce this again. Are you sure you downloaded the new
build? Could you try downloading a new build again?

Regards,
-Chris

Vadym Yepishov wrote:
> Hi Chris,
>
> Unfortunately the bug can still be reproduced under the new build.
> Please use the snippet described in my letter and do the following steps:
> 1) open the demo;
> 2) click on the grid column header;
> 3) click on the "close" button of the demo.
> Actual result: the demo is not closed (the "close" button just becomes
> active).
> Expected result: the demo should be closed.
>
> Hope you will find the source of the problem:)
>
> Best regards,
> Vadym Yepishov
>
> Chris Gross wrote:
>> Hi Vadym,
>>
>> This was a bug. I've fixed it. Please download a new build and
>> verify that it works.
>>
>> Regards,
>> -Chris
>>
>> Vadym Yepishov wrote:
>>> Hi guys,
>>>
>>> I faced the following problem: when I enable drag detection mechanism
>>> in the grid and then click on some grid column header, then I cannot
>>> close immediately the grid's shell: the first mouse click after click
>>> on the header activates the shell, and only the second click on the
>>> application's close button closes the application. This happens under
>>> Windows platform. Here is the snippet for this problem (actually this
>>> is GridSnippet1, modificated for drag detection support of the grid):
>>>
>>> package snippets;
>>>
>>> import org.eclipse.nebula.widgets.grid.Grid;
>>> import org.eclipse.nebula.widgets.grid.GridColumn;
>>> import org.eclipse.nebula.widgets.grid.GridItem;
>>> import org.eclipse.swt.SWT;
>>> import org.eclipse.swt.events.DragDetectEvent;
>>> import org.eclipse.swt.events.DragDetectListener;
>>> import org.eclipse.swt.layout.FillLayout;
>>> import org.eclipse.swt.widgets.Display;
>>> import org.eclipse.swt.widgets.Shell;
>>>
>>> /**
>>> * Creates a simple grid and a button for focusing and selection of
>>> * the first cell of the grid. */
>>> public class Snippet001GridDragDetectListener {
>>>
>>> /**
>>> * Main entry.
>>> * @param args command line arguments
>>> */
>>> public static void main(String[] args) {
>>> final Display display = new Display();
>>> final Shell shell = new Shell(display);
>>> shell.setLayout(new FillLayout());
>>>
>>> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL |
>>> SWT.H_SCROLL);
>>> grid.setHeaderVisible(true);
>>> final GridColumn column = new GridColumn(grid, SWT.NONE);
>>> column.setTree(true);
>>> column.setText("Column 1");
>>> column.setWidth(100);
>>> final GridItem item1 = new GridItem(grid, SWT.NONE);
>>> item1.setText("Root Item");
>>> final GridItem item2 = new GridItem(item1, SWT.NONE);
>>> item2.setText("Second item");
>>> final GridItem item3 = new GridItem(item2, SWT.NONE);
>>> item3.setText("Third Item");
>>> // The following code was inserted to enable
>>> // drag detection listening mechanism
>>> // in the grid.
>>> grid.setDragDetect(true);
>>> // If you add at least one drag detection listener
>>> // to the grid and then click on the grid column
>>> // header, then the grid's shell loses its active state,
>>> // that is, for example, you cannot then close the
>>> // demo with one mouse click (first mouse
>>> // click afterwards activates the grid's shell, and
>>> // only second mouse click closes the demo itself).
>>> grid.addDragDetectListener(new DragDetectListener() {
>>> /** {@inheritDoc} */
>>> public void dragDetected(final DragDetectEvent event) { }
>>> });
>>>
>>> shell.setSize(200, 200);
>>> shell.open();
>>> while (!shell.isDisposed()) {
>>> if (!display.readAndDispatch())
>>> display.sleep();
>>> }
>>> display.dispose();
>>> }
>>> }
>>>
>>> Does somebody know why it might be the case?
>>>
>>> Best regards,
>>>
>>> Vadym Yepishov
Re: Problem with shell closing after the grid drag detection mechanism being enabled and some grid c [message #588081 is a reply to message #47560] Mon, 28 January 2008 12:06 Go to previous message
Eclipse UserFriend
Originally posted by: vye.maconomy.dk

Hi Chris,

Thanks for your help. The defect is fixed now.

Regards,
Vadym

Chris Gross wrote:
> I can't reproduce this again. Are you sure you downloaded the new
> build? Could you try downloading a new build again?
>
> Regards,
> -Chris
>
> Vadym Yepishov wrote:
>> Hi Chris,
>>
>> Unfortunately the bug can still be reproduced under the new build.
>> Please use the snippet described in my letter and do the following steps:
>> 1) open the demo;
>> 2) click on the grid column header;
>> 3) click on the "close" button of the demo.
>> Actual result: the demo is not closed (the "close" button just becomes
>> active).
>> Expected result: the demo should be closed.
>>
>> Hope you will find the source of the problem:)
>>
>> Best regards,
>> Vadym Yepishov
>>
>> Chris Gross wrote:
>>> Hi Vadym,
>>>
>>> This was a bug. I've fixed it. Please download a new build and
>>> verify that it works.
>>>
>>> Regards,
>>> -Chris
>>>
>>> Vadym Yepishov wrote:
>>>> Hi guys,
>>>>
>>>> I faced the following problem: when I enable drag detection
>>>> mechanism in the grid and then click on some grid column header,
>>>> then I cannot close immediately the grid's shell: the first mouse
>>>> click after click on the header activates the shell, and only the
>>>> second click on the application's close button closes the
>>>> application. This happens under Windows platform. Here is the
>>>> snippet for this problem (actually this is GridSnippet1, modificated
>>>> for drag detection support of the grid):
>>>>
>>>> package snippets;
>>>>
>>>> import org.eclipse.nebula.widgets.grid.Grid;
>>>> import org.eclipse.nebula.widgets.grid.GridColumn;
>>>> import org.eclipse.nebula.widgets.grid.GridItem;
>>>> import org.eclipse.swt.SWT;
>>>> import org.eclipse.swt.events.DragDetectEvent;
>>>> import org.eclipse.swt.events.DragDetectListener;
>>>> import org.eclipse.swt.layout.FillLayout;
>>>> import org.eclipse.swt.widgets.Display;
>>>> import org.eclipse.swt.widgets.Shell;
>>>>
>>>> /**
>>>> * Creates a simple grid and a button for focusing and selection of
>>>> * the first cell of the grid. */
>>>> public class Snippet001GridDragDetectListener {
>>>>
>>>> /**
>>>> * Main entry.
>>>> * @param args command line arguments
>>>> */
>>>> public static void main(String[] args) {
>>>> final Display display = new Display();
>>>> final Shell shell = new Shell(display);
>>>> shell.setLayout(new FillLayout());
>>>>
>>>> final Grid grid = new Grid(shell, SWT.BORDER | SWT.V_SCROLL
>>>> | SWT.H_SCROLL);
>>>> grid.setHeaderVisible(true);
>>>> final GridColumn column = new GridColumn(grid, SWT.NONE);
>>>> column.setTree(true);
>>>> column.setText("Column 1");
>>>> column.setWidth(100);
>>>> final GridItem item1 = new GridItem(grid, SWT.NONE);
>>>> item1.setText("Root Item");
>>>> final GridItem item2 = new GridItem(item1, SWT.NONE);
>>>> item2.setText("Second item");
>>>> final GridItem item3 = new GridItem(item2, SWT.NONE);
>>>> item3.setText("Third Item");
>>>> // The following code was inserted to enable
>>>> // drag detection listening mechanism
>>>> // in the grid.
>>>> grid.setDragDetect(true);
>>>> // If you add at least one drag detection listener
>>>> // to the grid and then click on the grid column
>>>> // header, then the grid's shell loses its active state,
>>>> // that is, for example, you cannot then close the
>>>> // demo with one mouse click (first mouse
>>>> // click afterwards activates the grid's shell, and
>>>> // only second mouse click closes the demo itself).
>>>> grid.addDragDetectListener(new DragDetectListener() {
>>>> /** {@inheritDoc} */
>>>> public void dragDetected(final DragDetectEvent event) { }
>>>> });
>>>>
>>>> shell.setSize(200, 200);
>>>> shell.open();
>>>> while (!shell.isDisposed()) {
>>>> if (!display.readAndDispatch())
>>>> display.sleep();
>>>> }
>>>> display.dispose();
>>>> }
>>>> }
>>>>
>>>> Does somebody know why it might be the case?
>>>>
>>>> Best regards,
>>>>
>>>> Vadym Yepishov
Previous Topic:bug in CollapsibleButons
Next Topic:Grid row headers
Goto Forum:
  


Current Time: Thu Apr 25 19:44:21 GMT 2024

Powered by FUDForum. Page generated in 0.03760 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top