Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Framework locking is implemented through two Framework properties that are exposed to filters and command handlers, uLocked and uLockedMessage.

uLocked

Values are FALSE, USER, PROGRAM or PROGRAM_EXIT.

USER means that the Framework is locked, but that the user can elect to end the lock.

PROGRAM means that the Framework is locked and only a program can unlock it by setting this property to FALSE.

PROGRAM_EXIT means that the Framework is locked except when exiting or closing down and only a program can unlock it by setting this property to FALSE.

uLockedMessage

This is the message to be shown to the user if they attempt to do something that would violate the lock state.


For example you could put this code in the Changed event of fields on a command handler to lock the Framework until the user has saved changes:

Set #avFrameworkManager uLocked(USER) uLockedMessage('Details for the current Employee not saved. Would you like to return to the details command to save.')

Note
Note: Framework locks apply within the scope of each main Framework window. If the Allow this Object to be Opened in a New Window option is used to open a new main Framework window, the new window and all its child windows get their own (new) locking scope that is independent of all others.