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: Polymorphism - PB Implementation
Next Lesson: The Object Browser

PowerBuilder's Class Hierarchy

PowerBuilder is an object-oriented tool internally as well as externally. It provides the developer with base objects, such as windows, user objects and DataWindows, for developing applications, each derived from an internal PowerBuilder class. These classes make up PowerBuilder's internal class hierarchy.
Classes and objects can be confusing in PowerBuilder, as it refers most things as objects. This is because, in most cases, PowerBuilder handles instantiating class into an object for you. As such, when you create a window, it is created within a running version of PowerBuilder, which has already instantiated the window object from an internal window class. Also, most people recognize the term object more readily than class.

In C++ or other language-based environments, it's much easier to conceptualize the difference between an object and a class. A class is what you code and an object is what becomes of that code when you run your program. In 4GL languages, this difference gets blurred as the environment does most of this internally. However, classes are fundamental to the concept of object-oriented programming and you should make sure that you're comfortable with the term.

In PowerBuilder, all classes are ultimately derived from the PowerBuilder super class, PowerObject. This forms the top level of the class hierarchy, along with the SystemFunctions class. PowerObject is an internal abstract class that encapsulates the standard functions available in any PowerBuilder object. As an abstract class, it cannot be instantiated-you cannot create a PowerObject.

The PowerObject class has a number of descendant classes, from which the standard PowerBuilder objects available to the developer are derived. Let's take a look at the PowerBuilder class hierarchy.

The PowerObject class has eight direct descendants, each further defining the base functionality for the standard objects that are provided to the developer. These direct descendants are as follows. Classes added in version 6.0 is marked 'v6.0' in the following picture.

Application: Application class is used to instantiate the application object, the starting point for all PowerBuilder applications.

Function_object: Function_object class is used to instantiate a global function object. A global function object is a special purpose object, that encapsulates a single method. Global functions are used by developers to create globally accessible logic.

GraphicObject: GraphicObject class is the ancestor of all PowerBuilder's visual objects. Menu and window classes are inherited from this class, as is the WindowObject class. The WindowObject class is the ancestor of all visual object classes. It, in turn, has three descendants, each with further refined attributes. PowerBuilder's class hierarchy breaks down visual objects into three categories: objects that can be dragged, objects that cannot be dragged and a special class for MDI client objects.

GrAxis: This class provides the base functionality for PowerBuilder's graph object. The GrAxis class has three descendant classes: Category, Series and Values.

GrDispAttr:  GrDispAttr class is the base class used to specify the appearance of text objects on a graph. PowerBuilder provides descendant classes from the GrDispAttr class for graph titles, legends, pie graph text and two descendant classes (DispAttr and LabelDispAttr) for the three axes (category, series and value) in a graph.

NonVisualObject: This class is the base class for non-visual PowerBuilder objects, such as an Error object and the Message object.

Structure: The Structure class is the base class for a special object that encapsulates a number of properties, but doesn't have methods. In PowerBuilder, structure provides a mechanism to store related data elements.

Each of the seven descendants is further refined as we move down the PowerBuilder's class hierarchy, until a specific object type is made available to the developer. Then the developer creates instances of them using PowerBuilder painters.
HomePrevious Lesson: Polymorphism - PB Implementation
Next Lesson: The Object Browser

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