Return values from ancestor events

Return values from ancestor events

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 to get 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

See also - an AI reverse image search platform

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist