Consultor Eletrônico



Kbase 15691: SmartViewer ADD button won't clear all widgets - CLEAR FRAME
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
SmartViewer ADD button won't clear all widgets - CLEAR FRAME

Why aren't editor widgets cleared on ADD button?
------------------------------------------------
Pressing the ADD button on an UPDATE PANEL that is
associated with a SmartViewer will clear all fill-ins
in the viewer so that you can enter new information
for the new record that you are adding.

Non-fill-in fields such as combo-boxes, editor widgets,
toggle boxes and radio-sets will NOT be cleared. One of the
reasons for this is that the CLEAR FRAME statement was ONLY
designed to clear fill-in fields. This is not scheduled to
change any time soon in the Progress product. In the ADM,
the ADM-ADD-RECORD routine (invoked when the ADD
button is pressed) uses CLEAR FRAME. This is why ONLY fill-in
fields are cleared.

What can be done?
-----------------
To work around this in the ADM, you can create a
LOCAL-ADD-RECORD routine that will clear or re-initialize
the other types of widgets. For instance, in the case of
an EDITOR widget, you may want to include the following code
AFTER the default behavior in the LOCAL-ADD-RECORD routine:

editor-widget-field:screen-value in frame {&frame-name} = "".


In the case of toggle-boxes, radio-sets or combo-boxes, you may
want to assign an initial value to these fields INSTEAD of clearing
them since 'blank' is not really a valid choice for combo-boxes
and radio-sets and may not be meaningful to your toggle either.
Even though CLEAR FRAME itself will not be changed to clear widgets
other than fill-ins, the ADM will clear EDITOR
widgets in version 8.0A02. The ADM will NOT clear combo-boxes,
toggles and radio-sets for the same reasons listed above.


Progress Software Technical Support Note # 15691