Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Jul 24, 1997



Application Security Testing: An Integral Part of DevOps

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, overload the event for which you want to get the return value. Then, in your new descendant event, call the ancestor event code and capture the return value locally. Then process your script as normal.

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

String ls_Val

// Call ancestor script
ls_Val = super::TRIGGER STATIC EVENT ue_ken()

// My custom processing!
// ...
// ...

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date