PowerBuilder Interview Question and Answers

1. What is the User-defined function?
  A user define function is a collection of power script statements that perform some processing.
Two types of user define function :
  • Global function : Accessible any whare in the application.
  • Object Level function :Object Level functions are defined for a window, menu, user object or application object.
 
Your Name Your Email-ID
Your Answer
2. What are the Passing Arguments?
  PassByValue :
When an argument is passed by value the function can accesses the temperory local copy of the arguments and can change the value of the local copy.

PassByRef:
When an argument is passed by reference the function can accesses the original value of the argument and can change it directly.

PassbyReadOnly:
When an argument is passed by read-only we can’t change its value but we can change the value of the argument but we can’t assign another object to that object.

 
Your Name Your Email-ID
Your Answer
3. What are the Scope Variables?
  Local:
Local variable is a temporary variable only declared in the script itself and they are available only in the script where they were declared, when the script is finished execution the local variable is destroyed.

Instance:
Intance variable that belongs to an object and associated with an instance of object. It allows values to be shared between scripts in the same object.

Shared:
Shared variable retain their value when an object is closed and opened again.

Global:
Global variabl can access anywhere in the application. Can access any object in the application. It has public access level.

 
Your Name Your Email-ID
Your Answer
4. What events do you know for the application object?
  OPEN - the user starts application.

IDLE
No mouse or keyboard activity happens in a specified number of seconds SystemError - A serious error occurred during execution.

CLOSE
The user closes the application

ConnectionBegin
In a distributed computing environment, occurs on the server when a client establishes a connection to the server by calling the ConnectToServer function.

ConnectionEnd
In a distributed computing environment, occurs on the server when a client disconnects from the server by calling the DisconnectServer function.
 
Your Name Your Email-ID
Your Answer
5. How can you run another application from within PowerBuilder?
  We could do it using PB function Run(). Run(string{, WindowState}), where string is a string whose value is the filename of the program we want to execute. Optionally, the string can contain one or more parameters of the program; WindowState (optional) is a value of the WindowState enumerated data type indicating the state in which we want to run the program.
E.g., Run(“c:\windows\notepad.exe”, Maximized!)
 
Your Name Your Email-ID
Your Answer