Extending Functions
You probably know that you can extend or override a PowerBuilder event in a descendant object. But did you know you can also override or extend functions? When you declare a function in a descendant with the exact same name and arguments you override the ancestor function.

If you want to extend an ancestor function create a new function as if you wanted to overload the ancestor then place the following script at the top of the function.

super::uf_function_name( arg1, arg2, ...)

You receive return values as if you had placed a normal function call. Just ignore the fact that the super has been placed in front:

Integer li_I
li_I = super::SetReDraw( TRUE )
... your processing ...
RETURN li_I

If you have ever exported a PowerBuilder object and looked at the source code for an event you will see that this is exactly how PowerBuilder extends or overrides events!

Back