Tips on the syntax generated by DWSyntax
-
Anything surrounded by <> indicates
that a real value must be substituted (without surrounding <>).
All other syntax is correct as is including single quotes. -
Internal to PowerBuilder, all DataWindow object
properties are stored in strings. These can represent strings, numbers,
or boolean (1/0, yes/no).
Where appropriate the compiler allows for the assigning of
numbers or booleans and converts them to strings automatically.
When these same property values are read they are returned as a
string for the Describe syntax and as an Any variable for dot notation
syntax.
Examples
The DataWindow readonly property is stored as ‘yes’ or ‘no’.
Each of the following syntax statements sets the property
to ‘yes’.
1 |
dw_1.Modify("DataWindow.ReadOnly=Yes")dw_1.Modify("DataWindow.ReadOnly=True")dw_1.Object.DataWindow.ReadOnly = 'Yes'dw_1.Object.DataWindow.ReadOnly = True |
The result of dw_1.Describe("DataWindow.ReadOnly")
is
a string containing either ‘yes’ or ‘no’.
The result of dw_1.Object.DataWindow.ReadOnly
is
an Any containing either ‘yes’ or ‘no’.
The Column.Border property is stored as ‘0’ through ‘6’.
Each of the following syntax statements sets the property
to ‘5’.
1 |
dw_1.Modify("Column.Border = 5 ")dw_1.Modify("Column.Border = '5' ")dw_1.Object.Column.Border = 5dw_1.Object.Column.Border = '5' |
The result of dw_1.Describe("Column.Border")
is
always a string.
The result of dw_1.Object.Column.Border
is
an Any always containing a string.