Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Event Handler not called

Former Member
0 Kudos

Hi experts,

I have a Problem that my Event Handler is not triggered. I know, there are many discussions about that issue in scn but I think, I they couldn't help me.

I have a view-class cl_view with an event event_ucomm_fired and a method on_user_command where I raise the event event_ucomm_fired.

In my ctrl-class I create an event handler handle_ucomm (is defined as an event handler for event event_ucomm_fired and klass cl_view).

In the constructor of my ctrl-class I create an instance mo_view of cl_view and register the event handler via set handler me->handle_ucomm for mo_view.

But, when the event is raised in on_user_command, the event handler handle_ucomm will not be called?  I have no idea what’s wrong.

Anybody any idea?

Thanks and BR,

Sebastian

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I guess you create another instance of your view-class. So check first if the constructor of your ctrl-class is the once place you create an instance of your view-class.

1 REPLY 1

Former Member
0 Kudos

I guess you create another instance of your view-class. So check first if the constructor of your ctrl-class is the once place you create an instance of your view-class.