| 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 | |
Advanced PowerBuilder
Function OverridingYou can define the same function at different levels of the inheritance hierarchy tree. For example, you can define a save() at the base window, and can define the same function in the master and transaction windows, inherited from the base window. Now, you can write different script in the save() in the master window and the save() in the transaction window. This is because, PowerBuilder looks for the function from the current object level to up; calling the function in the master window always executes the logic written in the master window save function. For example, suppose you have three objects A, B and C in a hierarchy, where A is at the top and B is inherited from it. If you declared a function in A that prints a message to the printer, B inherits it. By modifying this function, you can set up your overloaded function too, say, print out a message in Times New Roman, rather than the default font.
If you now call this function from C, the function declared at B will be executed, causing the specified message to appear at your printer in Times New Roman, rather than the default font defined at A.
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |