Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Declaring instance variables – PB Docs 2017 – PowerBuilder Library

Declaring instance variables – PB Docs 2017

Declaring instance variables

Often, data needs to be accessible in several scripts within a
window. For example, assume a window displays information about one
customer. You might want several CommandButtons to manipulate the
data, and the script for each button needs to know the customer’s ID.
There are several ways to accomplish this:

  • Declare a global variable containing the current customer
    ID

    All scripts in the application have access to this
    variable.

  • Declare an instance variable within the window

    All scripts for the window and controls in the window have
    access to this variable.

  • Declare a shared variable within the window

    All scripts for the window and its controls have access to
    this variable. In addition, all other windows of the same type
    have access to the same variable.

When declaring variables, you need to consider what the scope of
the variable is. If the variable is meaningful only within a window,
declare it as a window-level variable, generally an instance variable.
If the variable is meaningful throughout the entire application, make
it a global variable.

For a complete description of the types of variables and how to
declare them, see the section called “Declaring variables” in PowerScript Reference.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x