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

Advantages of using inheritance – PB Docs 125 – PowerBuilder Library

Advantages of using inheritance – PB Docs 125

Advantages of using inheritance

Using inheritance has a number of advantages:

  • When you change the ancestor window,
    the changes are reflected in all descendants of the window. You
    do not have to make changes manually in the descendants as you would
    in a copy. This saves you coding time and makes the application
    easier to maintain.

  • Each descendant inherits the ancestor’s
    scripts, so you do not have to re–enter the code to add
    to the script.

  • You get consistency in the code and in the application
    windows.

When you use inheritance to build an object, everything in
the ancestor object is inherited in all its descendants. In the
descendant, you can:

  • Change
    the properties of the window

  • Add controls to the window and modify existing controls

  • Size and position the window and the controls in
    the window

  • Build new scripts for events in the window or its
    controls

  • Reference the ancestor’s functions and
    events

  • Reference the ancestor’s structures if
    the ancestor contains a public or protected instance variable of
    the structure data type

  • Access ancestor properties, such as instance variables,
    if the scope of the property is public or protected

  • Extend or override inherited scripts

  • Declare functions, structures, and variables for
    the window

  • Declare user events for the window and its controls

The only thing you cannot do is delete inherited controls. If you do not need an inherited
control, you can make it invisible in the descendent window.


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