nborshukov
New Member
Hi All!
Does anybody know something about how can set ot query widget attributes, treating them like array?
For eaxample: set "screen-value" attribute of w-hndl.
Now we use:
w-hndl:screen-value = "character value"
I want to have possibility to:
1. get the array index of "screen-value" attribute
define variable idx as integer no-undo.
idx = get-attr-index(w-hndl,"screen-value":U).
2. ...get the data type of the attribute
define variable dt as character no-undo.
dt = det-attr-type(w-hndl,"screen-value":U).
3. ...and set any-value variable value to this attribute:
case dt:
when "character":U then w-hndl:attr[idx] = string(any-value).
when "integer":U then w-hndl:attr[idx] = integer(any-value).
when .....
end case.
Does anybody know something about how can set ot query widget attributes, treating them like array?
For eaxample: set "screen-value" attribute of w-hndl.
Now we use:
w-hndl:screen-value = "character value"
I want to have possibility to:
1. get the array index of "screen-value" attribute
define variable idx as integer no-undo.
idx = get-attr-index(w-hndl,"screen-value":U).
2. ...get the data type of the attribute
define variable dt as character no-undo.
dt = det-attr-type(w-hndl,"screen-value":U).
3. ...and set any-value variable value to this attribute:
case dt:
when "character":U then w-hndl:attr[idx] = string(any-value).
when "integer":U then w-hndl:attr[idx] = integer(any-value).
when .....
end case.