See Also: Object, Deferred_View, Activating Views on Start-Up, Creating a View
To defer 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.
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
The Activate_View command activates a view object when called via its {accessMessage}.
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
Views are usually placed inside ClientArea objects. Due to this placement, Activate_View messages are usually sent to the application's ClientArea object.