Updated code for assigning of events

In case when list of events (eventObject) is undefined at compile step, events never be assigned. I've fixed this issue and also I've added opportunity to update eventObject (means reassign event list) at runtime.