Skip to content

Refresh - cComActiveXEntryControl_

Event sent from a DataDictionary object, which is used to synchronize the object's data with the DDO

Type: Event

Parameters

Parameter Type Description
notifyMode Integer The mode type of DDO operation which generated this refresh message. It may be one of the following:ConstantMeaning

Syntax

Procedure Refresh Integer notifyMode

Description

When a DDO operation, such as a save, delete, clear or find, occurs, the data entry objects (DEOs) connected to DataDictionary object (DDO) structure are sent the Refresh message. This is used to by the DEOs to synchronize themselves with the current record. Each DEO will display and clear data as needed.

This is a good message for augmentation. All changes in DDO activity are filtered through this message. When augmenting, you will almost always want to forward send the message.

// If order record exists, disallow entry in customer window.
Procedure Refresh Integer notifyMode
    Handle hoServer
    Boolean bHasRecord

    Get Server to hoServer              // get the ddo
    Get HasRecord of hoServer to bHasRecord // get record in ddo
    // Make displayonly if it has a record
    Set Enabled_State to (not(bHasRecord))

    Forward Send Refresh notifyMode          // do normal refresh
End_Procedure

When Refresh is called, the DDO structure and the table's file buffers are all up to date. You can use this information to customize the Refresh. If needed, you can use notifyMode to determine what type of DDO operation occurred. Because DDO operations are complex, a single operation, such as a find, might cause records within a DDO structure to be cleared, found or left alone. If you need to know the status of a particular table within a Refresh, you can use the DDRefreshTableStatus to determine a table's role in the DD event.

In addition to DDO and table buffers, internal change states are maintained during a Refresh and these internal states are easily changed. As a general rule, you do not want to change these buffers or find additional records within Refresh, as this might cause the entire Refresh event (i.e., where a DDO structure sends Refresh to many DEOs) to become unstable.

Within Refresh, you cannot send any DDO request messages to any DDO within your application. This includes, but is not limited to Request_Save, Request_Delete, Clear, Clear_All, Request_Find, Find, FindByRowId and Request_Read. If you are very careful, you can send Locate_Next and ReadByRowId -- this technique is used fill records in data aware grids. You can also directly find records from tables that are not part of the DDO structure.