Skip to content

Activate_View

See Also: Object, Deferred_View, Activating Views on Start-Up, Creating a View

Purpose

To defer the creation of a view object until the first time it is accessed (called) by a user, and to link its access/creation to a desktop-level activation message.

This command is managed by the DataFlex Studio's Object Properties window and is typically not edited manually.

Syntax

Activate_View {accessMessage} for {objectName}
Object {objectName} is a {className}
:
End_Object

Where:

  • {accessMessage} is the name of the activation message.
  • {objectName} is the name of the view object to be activated.
  • {className} is the class of the object to be created.

What It Does

The Activate_View command activates a view object when called via its {accessMessage}.

Example

This sample shows the structure of a typical Windows application and how to activate a view when the application starts.

Use DfAllEnt.pkg
:
Object oMain is a Panel
:
Object oClientArea is a ClientArea
    Use Order.vw
:
End_Object
End_Object

// Open Order Entry view on application startup

Send Activate_oOrderEntryView of (oClientArea(oMain))
Start_UI

Notes

  • Views are usually placed inside ClientArea objects. Due to this placement, Activate_View messages are typically sent to the application's ClientArea object.