Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Advanced PowerBuilder

HomePrevious Lesson: User Objects
Next Lesson: Creating a Standard User Object

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:
Visual
Class (non-visual)

Let's take a look at each of these categories.

Visual User Objects

A visual user object is a control or a set of controls, with certain functionality. Our 'Print' CommandButton is an example of a visual user object. There are four types of visual user objects:
Standard
Custom
External
VBX (Till version 4.0)

Class ( Non-Visual User Objects )

This type of user object doesn't have a visual component - it only has functionality. For example, you could write a function DisplayErrorMessage (), and then call this function whenever you need it in your application.

Non-Visual user objects allow you to write business rules and perform other processing, which can be later on reused as many times as required. There are three types of non-visual user objects: Till version 4.0, they are called non-visual user objects and from v4.0 onwards this category is called 'class'.
Standard
Custom
C++
HomePrevious Lesson: User Objects
Next Lesson: Creating a Standard User Object

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com