How to determine ancestor’s return value from its descendant

How can I determine the return value of an ancestor event from its descendant?

For example, the PFC_addrow event of the PFC datawindow. If I were to extend this event, I would like to know the number of the added row (return value of PFC_addrow).

Any clues?

There is no way to get the return value from an ancestor event. However,there is a way to do what you want. In your descendant script, overloadthe event for which you want the return value. Then in yournew descendant event, call the ancestor event code and capture the returnvalue locally, then process your script as normal.

In the following piece of sample code, I have created a user object withan event called ue_ken, which takes no parameters but returns astring. In my window I have placed a copy of the control and overloadedthe ue_ken event. The following code is used to call the ancestor eventand capture the return value:

// OVERLOADED EVENT! BE CAREFUL.String ls_Val// Call ancestor scriptls_Val = super::TRIGGER STATIC EVENT ue_ken()// My custom processing!// …// …RETURN ls_Val

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: