Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Using cascaded calling and return values – PB Docs 2022 – PowerBuilder Library

Using cascaded calling and return values – PB Docs 2022

Using
cascaded calling and return values

PowerBuilder dot notation allows you to chain together several
object function or event calls. The return value of the function or
event becomes the object for the following call.

This syntax shows the relationship between the return values of
three cascaded function calls:

Disadvantage of cascaded calls

When you call several functions in a cascade, you cannot check
their return values and make sure they succeeded. If you want to check
return values (and checking is always a good idea), call each function
separately and assign the return values to variables. Then you can use
the verified variables in dot notation before the final function
name.

Dynamic calls

If you use the DYNAMIC keyword in a chain of cascaded calls, it
carries over to all function calls that follow.

In this example, both func1 and func2 are called
dynamically:

The compiler reports an error if you use DYNAMIC more than once in
a cascaded call. This example would cause an error:

Posted functions and
events

Posted functions and events do not return a value to the calling
scripts. Therefore, you can only use POST for the last function or event
in a cascaded call. Calls before the last must return a valid object
that can be used by the following call.

System events

System events can only be last in a cascaded list of calls,
because their return value is a long (or they have no return value).
They do not return an object that can be used by the next call.

An event you have defined can have a return value whose datatype
is an object. You can include such events in a cascaded call.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x