Names for DataWindow controls and DataWindow objects
There are two names to be aware of when you are working with
a DataWindow:
-
The name of the DataWindow
control -
The name of the DataWindow object associated with
the control
The DataWindow control name
When you place a DataWindow control in a window or form, it
gets a default name. You should change the name to be something
meaningful for your application.
In PowerBuilder, the name of the control has traditionally
had a prefix of dw_. This is a useful convention to observe
in any development environment. For example, if the DataWindow control
lists customers, you might want to name it dw_customer.
Using the name
In code, always refer to a DataWindow by the name of the control (such
as dw_customer). Do not refer to the DataWindow object that
is in the control.
The DataWindow object name
To avoid confusion, you should use different prefixes for
DataWindow objects and DataWindow controls. The prefix d_ is commonly
used for DataWindow objects. For example, if the name of the DataWindow
control is dw_customer, you might want to name the corresponding
DataWindow object d_customer.