The Framework services manager provides a virtual clipboard facility.
The clipboard is designed to serve two main needs:
To use the virtual clipboard most effectively you need to devise a standardized naming protocol for items that are posted onto it.
The clipboard uses a minimum 3 part naming standard and any name can support multiple instances (i.e.: become a list of values) and optionally function in multiple languages, so it's quite easy to devise an object.property style naming model for information that is posted to it.
For example, when a user starts using a General Ledger application they may need to select the Company and a Currency that they will be working with. These values are accessed by lots of filters and command handlers within the application as the user moves around.
Conceptually, we now have a "GL Application" object that contains "SelectedCompany" and "SelectedCurrency" properties.
Using the clipboard you can easily define GLAPPLICATION.SelectedCompany and GLAPPLICATION.SelectedCurrency as things on the clipboard. Your GLAPPLICATION clipboard object is infinitely extensible without application recompiles and can contain lists, etc. as required.
Invoke #AvFrameworkManager.avRestoreValue WithID1(GLAPPLICATION) WithID2(SelectedCompany) ToAValue(#CompanyNo)
Invoke #AvFrameworkManager.avRestoreValue WithID1(GLAPPLICATION) WithID2(SelectedCurrency) ToAValue(#CurrCode)
Equally you might devise a naming protocol for information that is private (i.e., scoped) within an individual function. For example, you might use PRIVATE.<function name>.<property name>. To save the value of #EMPNO using the naming standard as PRIVATE.<function name>.EmployeeNumber you might code this in a Windows or WAM browser application:
Invoke #AvFrameworkManager.avSaveValue WithID1(PRIVATE) WithID2(*COMPONENT) WithID3(EmployeeNumber) FromAValue(#Empno)
See also: