cancel
Showing results for 
Search instead for 
Did you mean: 

EventFilters and EventFilter.Item

Former Member
0 Kudos

Hi, I have 2 questions about using EventFilter and the EventFilter.item method.

The First one is that the EventFilters are stored in the database when you run them for the first time. I was compiling my project and in order to check something, I commented some lines in the menu_click Event just to prove that the user forms does not open when you click them if the eventfilter is not there.

I would like to know if I'm right or what's the meaning of the menu_click event?

The second one, is about the use of the Eventfilter.item. Making my tests some of the Buttons or actions like Item_pressed, or click, were disabled. I wrote the line EventFilter.Item("MyItem") and the problem was corrected using this, but if i commented the line after the event runs properly. Which use does this method has?

Thanks a lot, Reynaldo

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member201110
Active Contributor
0 Kudos

Hi Reynaldo,

Event filters are not stored in the database. They are held in memory as part of the properties of the UI API application object that you have instantiated in your addon. If you do not set any event filters then the default is to accept all events on all forms (which is bad practice as it will slow down the SBO client as all events have to be sent to your addon).

The Menu_Click event is triggered when a user clicks on any child menu (ie a menu that doesn't have child menus of its own). The menu item can be in the Main Menu, top menu or any right-click menu. You cannot filter the menu click event so your only choice is to turn it on or off.

EventFilter.Item("MyItem") will return a specific event filter within your EventFilters collection. You can then add new filters to this event type or remove existing ones.

Kind Regards,

Owen