Advanced PowerBuilder

HomePrevious Lesson: User Objects
Next Lesson: Visual User Objects

Introduction

One of the main features of object oriented programming is reusability. In an application, you will normally have a selection of controls or objects, that essentially perform the same task, scattered throughout the design. Two good examples are the 'Print' CommandButtons, which allow users to receive hard copies of what they see on screen, and the related printer CommandButtons, that allow the users to specify printer parameters and so on.

If you have number of windows, you might want to allow the user to print from each one of them, a feature that would usually mean rewriting the same piece of code many times. User objects provide a solution, by allowing you to reuse one object or a single piece of code many times throughout the application.

User objects allow you to customize PowerBuilder's standard controls, to make use of third party controls, and moreover to create your own. You can reuse these objects and simplify standardization of the functionality in your applications. For example, you could use the same 'Print' CommandButton User object throughout the application and never worry about, or spend time for checking the functionality being the same or not, in each instance.

User objects can be broadly divided into two categories:

Let's take a look at each of these categories.
HomePrevious Lesson: User Objects
Next Lesson: Visual User Objects