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 inheritance to build user objects – PB Docs 125 – PowerBuilder Library

Using inheritance to build user objects – PB Docs 125

Using inheritance to build user objects

When you build a user object that inherits its definition
(properties, events, functions, structures, variables, controls,
and scripts) from an existing user object, you save coding time.
All you must do is modify the inherited definition to meet the requirements
of the current application.

For example, suppose your application has a user object u_file_view that
has three CommandButtons:

  • List—displays
    a list of files in a list

  • Open—opens the selected file and displays
    the file in a MultiLineEdit control

  • Close—displays a message box and then closes
    the window

If you want to build another user object that is exactly like
the existing u_file_view except
that it has a fourth CommandButton, you can use inheritance to build
the new user object, and then all you need to do is add the fourth CommandButton.

proc.png To use inheritance to build a descendent user
object:

  1. Click the Inherit button in the PowerBar,
    or select File>Inherit from the menu bar.

  2. In the Inherit From Object dialog box, select
    User Objects from the Objects of Type drop-down list.

  3. Select the target as well as the library or libraries
    you want to look in.

    note.png Displaying user objects from many libraries

    To find a user object more easily, you can select more than
    one library in the Libraries list. Use Ctrl+click to toggle
    selected libraries and Shift+click to select a range.

  4. Select the user object you want to use to create
    the descendant, and click OK.

    The
    selected object displays in the User Object painter and the title
    bar indicates that the object is a descendant.

  5. Make any changes you want to the user object.

  6. Save the user object with a new name.


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