Thanks for respond.
I create some object. This object has its own logic but it needs to give capability to react on some events (inside object) from outside. i know, CoDeSys has similar system to handle services in IEC.
hEvent := EventOpen(EVT_StopDone, CMPID_CmpApp, Result);
Result := EventRegisterCallbackFunction(hEvent, ADR(myFunction));
Where myFunction is the FUNCTION which is called if EVT_StopDone happens.
and i need something the same.
I'll think about different ways... inheritance and addition maybe...