Skip to Content
0
Jan 06, 2013 at 04:05 AM

Event Handling Problem

23 Views

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