Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » SWT EVENTS CAPTURING IN LINUX
SWT EVENTS CAPTURING IN LINUX [message #494920] Tue, 03 November 2009 03:59 Go to next message
Juan is currently offline Juan
Messages: 29
Registered: July 2009
Junior Member
Hi everybody!

I've got a real rare problem with events: I have a SWT Table with two
columns: each one has a control. Each control has a Listener for the
SWT.focusOut event. Problem: It doesn't enter in the handleEvent() of
the listener if executing in Linux (it seems not being capturing it!).
In Windows it works fine.

Does anybody has an idea to solve it? All suggestions will be welcome!!

Thanks in advance.

Juan M.A.N.
SWT EVENTS CAPTURING IN LINUX [message #494976 is a reply to message #494920] Tue, 03 November 2009 07:42 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 276
Registered: July 2009
Senior Member

Hi everybody!

I've got a real rare problem with events: I have a SWT Table with two
columns: each one has a control. Each control has a Listener for the
SWT.focusOut event. Problem: It doesn't enter in the handleEvent() of
the listener if executing in Linux (it seems not being capturing it!).
In Windows it works fine.

Does anybody has an idea to solve it? All suggestions will be welcome!!

Thanks in advance.

Juan M.A.N.

--------------------------------------
Hi Juan,

This seems an SWT issue. I have moved it to that newsgroup.

Best Regards,

Wim Jongman
----------------------------------------
Re: SWT EVENTS CAPTURING IN LINUX [message #495074 is a reply to message #494976] Tue, 03 November 2009 12:27 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
Hi,

This works for me with the snippet below, does the snippet work for you? If
so, can you change it to more closely resemble your case and to show
FocusOut not being received by the editor control?

public class ModifiedSnippet149 {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout (new FillLayout ());
Table table = new Table (shell, SWT.BORDER);
table.setHeaderVisible (true);
table.setLinesVisible(true);
for (int i=0; i<2; i++) {
new TableColumn (table, SWT.NONE);
}
table.getColumn (0).setText ("Task");
table.getColumn (1).setText ("Progress");
for (int i=0; i<40; i++) {
TableItem item = new TableItem (table, SWT.NONE);
item.setText ("Task " + i);
if ( i % 5 == 0) {
for (int j = 0; j < 2; j++) {
Combo bar = new Combo (table, SWT.NONE);
TableEditor editor = new TableEditor (table);
editor.grabHorizontal = editor.grabVertical = true;
editor.setEditor (bar, item, j);
bar.addListener(SWT.FocusOut, new Listener() {
public void handleEvent(Event event) {
System.out.println("focus out");
}
});
}
}
}
table.getColumn (0).pack ();
table.getColumn (1).setWidth (128);
shell.pack ();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}

Grant


"Wim Jongman" <wim.jongman@remainsoftware.com> wrote in message
news:hcp8fg$662$1@build.eclipse.org...
> Hi everybody!
>
> I've got a real rare problem with events: I have a SWT Table with two
> columns: each one has a control. Each control has a Listener for the
> SWT.focusOut event. Problem: It doesn't enter in the handleEvent() of
> the listener if executing in Linux (it seems not being capturing it!).
> In Windows it works fine.
>
> Does anybody has an idea to solve it? All suggestions will be welcome!!
>
> Thanks in advance.
>
> Juan M.A.N.
>
> --------------------------------------
> Hi Juan,
>
> This seems an SWT issue. I have moved it to that newsgroup.
>
> Best Regards,
>
> Wim Jongman
> ----------------------------------------
Previous Topic:Starting OSGI Bundles while executing a RCP App
Next Topic:PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
Goto Forum:
  


Current Time: Sat Aug 23 11:30:39 EDT 2014

Powered by FUDForum. Page generated in 0.02903 seconds