Application Development and Automation 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: 
Read only

Event Handler not called

Former Member
0 Likes
1,271

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
Read only

Former Member
0 Likes
927

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
Read only

Former Member
0 Likes
928

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.