Kbase P93415: Error 4052 with SET-SELECTION() in adm2/viewer.p/addRecord
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/11/2005 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.0B
SYMPTOM(s):
**SET-SELECTION is not a settable attribute for <widget id>. (4052)
**<attribute> is not a <settable/queryable> attribute for <widget id>. (4052)
Error comes from adm2/viewer.p/addRecord
CAUSE:
Bug# 20040727-017
CAUSE:
Known regression in 10.0B, development aware.
adm2/viewer.p/addRecord has been modified to use the following code that makes problems with some widget types like TOGGLE-BOX, RADIO-SET, SELECTION-LIST, some subtypes of COMBO-BOX'es and the SLIDER :
/* We've moved the apply entry before the call to addrow. (see above)
This causes the highlight to disappear, so use set-selection
to achieve old behavior. (another applyEntry call would cause
entry triggers firing twice, which is not always appreciated) */
IF VALID-HANDLE(FOCUS)
AND FOCUS = hFocus /* Only if same as applied above */
AND FOCUS:SENSITIVE /* avoid non-sensitive read-only=false widgets..*/
AND CAN-QUERY(hFocus,'SCREEN-VALUE':U)
AND LENGTH(hFocus:SCREEN-VALUE) > 1 THEN
hFocus:SET-SELECTION(1,LENGTH(hFocus:SCREEN-VALUE) + 1).
RETURN.
FIX:
Upgrade to OpenEdge 10.0B01 or later.
Upgrade to Dynamics 2.1B or later.
Alternatively, modify the code to add 'CAN-QUERY(hFocus,'SET-SELECTION':U)' as shown bellow:
[...]
IF VALID-HANDLE(FOCUS)
AND FOCUS = hFocus /* Only if same as applied above */
AND FOCUS:SENSITIVE /* avoid non-sensitive read-only=false widgets..*/
AND CAN-QUERY(hFocus,'SCREEN-VALUE':U)
AND LENGTH(hFocus:SCREEN-VALUE) > 1
AND CAN-QUERY(hFocus,'SET-SELECTION':U)
THEN hFocus:SET-SELECTION(1,LENGTH(hFocus:SCREEN-VALUE) + 1).
[...]