You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Note that:

  • Clipboard information is normally remembered across executions of a Framework. You can stop this from happening by using Persistent(FALSE) when using the avSaveValue method.
  • You should never put confidential or critical information on the clipboard. 
  • The volume and frequency of update of information on the clipboard will affect the performance of your application.

UseAValueDefault, UseAValueUDefault and UseNValueDefault

Method avRestoreValue has UseAValueDefault, UseAValueUDefault and UseNValueDefault parameters that can be used to specify which default value should be used when a clipboard entry cannot be found.

This means that the previous example could be more easily coded like this:

Invoke #AvFrameworkManager.avRestoreValue WithID1(*Component) WithID2(NumberofCopies) ToNValue(#NumCopies) UseNValueDefault(42)

ForLanguage

There is an additional clipboard parameter named ForLanguage that can be used when the thing being remembered is language dependent. Typically this is used like this:

Invoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(#HelloMessage.Name) FromAValue(#HelloMessage) FoLanguage(*Language)

This means that the clipboard maintains different #HelloMessage values for different languages.

Instance

There is an additional numeric parameter named Instance which allows you to keep many instances of a value on the clipboard. This effectively allows you to place lists of things onto the clipboard.

For example, imagine you had a list view containing employee numbers (#EmpNo) and salaries (#Salary) in your program.  Then this code:

Change #Instance 0


SelectList #ListView
   Change #Instance '#Instance + 1'
   Invoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(EMPLOYEE_LIST_EMPNO)
                                FromAValue(#Empno) Instance(#Instance)
   Invoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(EMPLOYEE_LIST_SALARY)
                                FromNValue(#Salary) Instance(#Instance)

Endselect

Invoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(EMPLOYEE_LIST_COUNT)
                             FromNValue(#Instance)

Creates a list (and count) of employee numbers and salaries on the clipboard

  • No labels