Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Display filter events
Display filter events [message #123574] Tue, 03 March 2009 07:03 Go to next message
Boris Stepanov is currently offline Boris StepanovFriend
Messages: 68
Registered: July 2009
Member
Hello,

I've added filter to display on MouseUp event. I want to know which
button was pressed, but field button of event object is always 0. I
looked at sources and found the following code in TypedEvent class:

private org.eclipse.swt.widgets.Event processFilters() {
IFilterEntry[] filters = getFilterEntries();
org.eclipse.swt.widgets.Event result
= new org.eclipse.swt.widgets.Event();
result.widget = widget;
result.type = getID();
for( int i = 0; !isFiltered( result ) && i < filters.length; i++ ) {
if( filters[ i ].getType() == result.type ) {
filters[ i ].getListener().handleEvent( result );
}
}
return result;
}

TypedEvent contains all fields, but when new event object is created
only two fields will be copied (widget and type). Is it bug?

Thanks.
Re: Display filter events [message #123604 is a reply to message #123574] Tue, 03 March 2009 09:34 Go to previous messageGo to next message
Boris Stepanov is currently offline Boris StepanovFriend
Messages: 68
Registered: July 2009
Member
Another problem in Close event. Listeners are invoked only when I close
Shell by keyboard (ESC) if I press OK or Cancel button in Dialog by
mouse listeners don't work. I found the following code in Window.close()
method:

// If we "close" the shell recursion will occur.
// Instead, we need to "dispose" the shell to remove it from the
// display.
shell.dispose();

But notification is invoked from shell.close().

Also I found several TODO marked code parts in TypedEvent class. Will
they be fixed in M6?
Re: Display filter events [message #123617 is a reply to message #123574] Tue, 03 March 2009 09:40 Go to previous message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 338
Registered: July 2009
Senior Member
Hi Boris,

regarding the display filters - this is a known bug. See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264945

I hope we can fix this with the 1.2 release.

Cheers
Benny

Boris Stepanov wrote:
> Hello,
>
> I've added filter to display on MouseUp event. I want to know which
> button was pressed, but field button of event object is always 0. I
> looked at sources and found the following code in TypedEvent class:
>
> private org.eclipse.swt.widgets.Event processFilters() {
> IFilterEntry[] filters = getFilterEntries();
> org.eclipse.swt.widgets.Event result
> = new org.eclipse.swt.widgets.Event();
> result.widget = widget;
> result.type = getID();
> for( int i = 0; !isFiltered( result ) && i < filters.length; i++ ) {
> if( filters[ i ].getType() == result.type ) {
> filters[ i ].getListener().handleEvent( result );
> }
> }
> return result;
> }
>
> TypedEvent contains all fields, but when new event object is created
> only two fields will be copied (widget and type). Is it bug?
>
> Thanks.


--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
Previous Topic:FilteredItemsSelectionDialog not working
Next Topic:History
Goto Forum:
  


Current Time: Tue Apr 23 07:02:58 GMT 2024

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

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

Back to the top