Consultor Eletrônico



Kbase P25044: Why the 'enableobject' is not enabling back the fields of a
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   13/05/2003
Status: Unverified

GOAL:

Why the 'enableobject' is not enabling back the fields of a SmartViewer?

FACT(s) (Environment):

Progess 9.1x

CAUSE:

After using within a SmartWindow the 'DisableObject' IN SmartViewerHandle in way to disable the SmartViewer and it's fields, if you use the 'EnableObject' IN SmartViewerHandle, the fields contained within the SmartViewer are not enabled back.

FIX:

This is an expected behavior.

Note that enableObject and disableObject are not completely opposite in their effects. disableObject always invokes disableFields because it is not meaningful to have a SmartObject disabled while RowObject fields inside it are enabled. On the other hand, enableObject does not invoke enableFields; this is done separately to allow enabling of a SmartObject's RowObject fields independently of other basic widgets it contains.

In way to be able to enable the fields of the viewer back you will need to create an internal procedure within the SmartViewer called for example 'Procedure1'.

The code then for correctly enabling the object and fields from the SmartWindows will be as follow.

Code in the SmartViewer:
/* Procedure1 in SmartViewer */
RUN Enablefields.

Code in the SmartWindow:
RUN Procedure1 in SmartViewerHandle.
RUN EnableObject in SmartViewerHandle.

This will enable the fields within the Object and the Object itself.