LANGUAGES | POWER BUILDER | POWER BUILDER INTERVIEW QUESTION AND ANSWERS - 20

PowerBuilder Interview Question and Answers:

105.     What are facilities of the User Objects?
      We define a component once, then reuse it many times as we need without any additional work.

106.     What does Open User Object() do?
      Open User Object() adds a user object to the specified window and makes all its properties and controls available to scripts. window name.Open User Object ( user object var, user object type {, x, y } ) This function is used when you want dynamically, at run time place some user objects on a window. This function displays this user object, makes all its attributes available to scripts. You must open a user object before you can access the attributes of the user object. If you access the user object’s attributes before you open it, it will cause an execution error.

107.     How can you dynamically place an User Object on the window?
      By using functions : Open User Object( ), Open User Object With Parm( )

108.     What Events does the Custom Class have?
      Constructor and Destructor

 109.     What are Non-Visual User Objects?
      Non-visual user object is an object that encapsulates attributes and functions but is not visible to the user. NVO is a collection of business user functions. They can be Custom Class and Standard Class. NVOs are useful because they allow you to encapsulate application operations into objects making them easier to develop, manage and maintain and also to encapsulate all security management for an application into a single object.

110.     Explain the purpose of a non-visual user objects?
      The purpose of non-visual user objects is to define business rules and other processing (which are checked in different windows in your application) that act as a unit. We implement them in Power Builder using Class User Objects.

111.     What events are available to a standard class User Object?
      Constructor and Destructor.

112.     How is a custom visual UserObject different from a standard UserObject?
      A custom visual user object is an object that has several controls that work as a unit. A standard visual user object inherits its definition from a standard control. We modify the definition to make the control specific to our applications.

LANGUAGES | POWER BUILDER | POWER BUILDER INTERVIEW QUESTION AND ANSWERS - 19

Power Builder Interview Question and Answers:

97.     When do you need to use .PBD?
      We use .PBD when the number and size of the objects in our application would otherwise make a very large .EXE (1.2 to 1.5 megabytes). we need to share components among several applications. distribute application components selectively, for example, to upgrade an application or fix a bug.

98.     How many .PBDs can you have for one application?
      As many as we need and depending on available memory.

99.     How many .PBRs can you have for one application?
      One

100.     What is .PBR file?
      PBR file is an ASCII File in which we list resource names or DW object names that were referenced dynamically in the script.

101.     What types of Menus available in Power Builder?
     

    Drop Down
    Cascading
    Pop-up

102.     What is Regenerate option in the Library painter? When is it most useful?
      It compiles all codes of an object(s). Regeneration is important during the development of our PB application. Regeneration is useful :

    when we have an error message with no reason for it;
    When we upgrade to a new version of PB, the new version should regenerate all its source code to update it;
    When we make a change to an ancestor window that has many descendants, the changes can be immediately rippled throughout all child window through regeneration. Regenerating could be called “recompiling”. When you regenerate an entry, Power Builder recompiles the source form stored in the library and replaces the existing compiled form with the recompiled form.


103.     When do you need to use a .PBR?
      We create .PBR if we have any dynamically assigned objects, bitmaps or icons and to reduce the number of files we need to distribute with the .EXE. We typically use a .PBR when we have scripts in our application in which we dynamically assign resources to attributes of objects or controls in the application. If we do not use a .PBR, we must distribute various .BMP, .RLE, .ICO files with the application. We must place in .PBD’s any objects that we reference dynamically in scripts in the application.

104.     Why do we create PBR, PBD files?
      We create .PBR if we have any dynamically assigned objects, bitmaps or icons to reduce the number of files we need to distribute with the .EXE. We have to create .PBD if we have more than one PBL. It allows us to break the application into smaller units that are easier to manage and makes the executable file smaller, and at execution time we can load any objects that are not contained in the application’s executable file. It makes sense to use PBD when our application is really large.

LANGUAGES | POWER BUILDER | POWER BUILDER INTERVIEW QUESTION AND ANSWERS - 19

PowerBuilder Interview Question and Answers:

96.     What is the differents between EVENT and FUNCTION in PowerBuilder?
     
      EVENT                                                                                FUNCTIUON
1.     An action in an object or control that can trigger a script.     A program or rutine that performs specific process.

2.     Top-Down approach     Bottom-Up approach

3.     Event has User Event and System or Built-in Event.             Function has System Function, Object Function, User Define Function, Global Function, Local External Function, Global External Function and Remote Procedure call (RPC).

4.     Event has Public default Access Level                               Function can declare Public, Private and Protected Access Level.

5.     Event has PassByVal, PassByRef and ReadOnly.               Function has PassByVal, PassByRef and ReadOnly.

6.     Event can call Object Events Dynamically or Statically.      Function can call Object Level Function Dynamically or Statically.

7.     We can POST or TRIGGER an Event call.                        We can POST or TRIGGER a Function call

8.     Events are associated only with objects.                           Function can be Global or part of an object’s definition.

9.     Call an undefined event does not trigger an error.             Call an undefined function triggers an error.

10.     Event cannot be Overloaded                                         Object-Level  Function can be OverLoaded.

11.     Events either return a value or do not have a return value.     Function always has return value.