[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Passing events from Widget to Widget

Paul Webster schrieb:
Tom Schindl wrote:
Well I've also tried that and guess what no effect on OS-X (at least for the Table-Example) :-)

Is it that you want the SWT.MouseDown to cause a selection event on the table? It does sound like display.post(*) is what you want.


Right know you are posting the event with the event.widget == s, no? What happens if you update the widget before you post?

public void handleEvent(Event event) {
s.close();
// set the widget to the table, or maybe one of the
// table items so it can be translated into a table selection
event.widget = someTableItem;
display.post(event);
}

Well doing this:

Point toDisplay = s.toDisplay( event.x, event.y );
event.x = toDisplay.x;
event.y = toDisplay.y;
event.widget = t;
event.item = t.getItem(t.toControl(s.toDisplay(new Point(event.x,event.y))));
display.post(event);
s.close();


makes a difference it completely freezes OS-X :-)

The thing that strikes me is that the original code works on Gtk and Win32 but not on OS-X which is a IMHO a:
- bug on win32 and GTK
- bug on OS-X


Until now none of the SWT guys had an answer for me which makes me nervous. I'm fine if somebody tells me that I'm heading completely in the wrong direction and the orginal code only works by chance but I'm really out of ideas :-(

Tom




Later, PW




--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl                                          JFace-Committer
--------------------------------------------------------------------