Advanced PowerBuilder

HomePrevious Lesson: Shared Variables
Next Lesson: Communication between Objects

Instance Variables

Instance variables are created when an instance of the object is created and is destroyed when the object's instance is destroyed. If more than one instance of an object is opened, the value of the instance variables can be different in each case.

Instance variables can be declared for application, menu, window and user objects. The procedure for declaring instance is same as global and shared variables. When declared for windows or user objects, they are available to the controls which are part of the object. For example, if you declare an instance variable at the window level, you can refer to it in the script/function of any control that is placed on that Window. .
HomePrevious Lesson: Shared Variables
Next Lesson: Communication between Objects