| Hyderabad Jobs | Book Website | ![]() |
I Love Hyderabad | Hyderabad Colleges |
| Home | Business Emails | Hyderabad Classifieds | Contact Us | |
| 7 Wonders of Hyderabad | Web Hosting | Yellow Pages | Our Network | |
Introduction to PowerBuilder
Cascaded Events and FunctionsThe event/function syntax allows you to make nested event/function calls. The return value of the first event/function must be an object and it becomes the object upon which the second event/function acts.
The above example calculates production for different type of machines; machine from different vendors and of different makes have different formulas for production calculation. Function call of_GetObject() at custom class object nc_MachineObject returns appropriate custom class object depending on the vendor and the make of the machine. The second function of_GetProd() returns production for that machine depending on the number of hours that machine ran and the type of the product.
The above code does the same thing as the earlier code listing, however, this code uses nested function calls. As you can see here, you can't check if the returned object by of_GetObject() is a valid object or not. If you use DYNAMIC keyword for the first event/function from left, it would apply for all nested event/function calls. Another suggestion would be that if you want to post event/function calls, do it only for the last event/function call.
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |