Skip to Content

Event Handling Problem

Hi Friends,

I searched many threads in sdn and i am not able to understand that event handling problem that is i am registering method m3 and m2 but it is raising events e1 and e2 and when i am trying for single event e1 for both the methods m2 ,m3 it is raising based on registration.

class abc definition.

public section.

events : e1 , e2.

methods : m1,

m2 for event e1 of abc,

m3 for event e2 of abc.

endclass.

class abc implementation.

method m1.

raise event e1.

raise event e2.

endmethod.

method m2.

write : / 'Event Handler method m2 '.

endmethod.

method m3.

write : 'Eventhandler method m3'.

endmethod.

endclass.

start-of-selection.

data : obj_abc type ref to abc.

create object obj_abc.

set handler obj_abc->m3 for obj_abc.

set handler obj_abc->m2 for obj_abc.

call method obj_abc->m1.

Thanks,

Raghunadh.K

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 07, 2013 at 05:49 PM

    I didn't follow your question.

    Based on your sample code, it would call both methods M2 & M3 as you are raising events E1 and E2 within M1. Can you point, what exactly you are not able to understand.

    Regards,
    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.